include-pattern-feedback

Jump to: navigation, search

Include Pattern Feedback

Contents

Feedback about include-pattern.

Removal of <object> as an instance of the include-pattern

open issue! 2008-06-23 raised by Sarven Capadisli

http://www.w3.org/TR/html401/struct/objects.html#h-13.3 states: "Most user agents have built-in mechanisms for rendering common data types such as text, GIF images, colors, fonts, and a handful of graphic elements. To render data types they don't support natively, user agents generally run external applications. The OBJECT element allows authors to control whether data should be rendered externally or by some program, specified by the author, that renders the data within the user agent."

The key being "to render data types" the user-agents "don't support natively" can be handled with <object> by running an external application. In the case of the include-pattern, we are merely trying to "include" or "refer" to some text/html. The latter is done sufficiently with <a>.

+1 for removal --Sarven Capadisli 16:34, 23 Jun 2008 (PDT)

Objects and Browser Behavior

open issue! This is still open: To close it we need to version numbers of the affected browsers to add to the main documentation. The issue itself is how handled by using the hyperlink pattern.

Over at Yahoo! Local, we were using the object include pattern for all our hReviews on business detail pages and review listings. That is, until we realized that Safari and Internet Explorer both try to embed the entire page with every OBJECT call. (Firefox correctly recognizes that it's a local object and doesn't reload anything.)

On a page with 20+ reviews, this means a substantial increase in load time and memory consumption. As a result of this (bad) browser behavior, we removed the objects entirely.

-- AndyBaio 29 Jun 2006

Based on this conversation http://krijnhoetmer.nl/irc-logs/whatwg/20080617#l-444 <object data="#foo" class="include" type="text/html"></object> will embed (making a separate request) all of the content from the current document, meanwhile pointing to the identifier. This is actually the proper way <object> is supposed to be handled by the user-agents. (Safari 3/Win, it turns out, is treating the <object> element properly.) --Sarven Capadisli 16:34, 23 Jun 2008 (PDT)


Safari 2.x OBJECT element handling

open issue! This issue needs clarification of the ‘major issues’ referred to, Safari version numbers involved, whether they are still present in later builds of Safari 2, or in builds of Safari 3.

My hResume page seen here caused Safari 2.0 some major issues. The page was jumping between object elements when a link was hovered eventually causing the browser to crash. You can follow the thread on the WSG mail archive.

It seems that while the object element may be more semantically appropriate it is not may not be usable in lieu of the issues raised in Safari.

--Robert O'Rourke 12:08, 3 Nov 2006 (PST)

Which version of Safari? Please be specific as many Safari OBJECT bugs were fixed in Safari 2.x.

-- Tantek 13:39, 3 Nov 2006 (PST)

The issues with OBJECT in Internet Explorer & Safari and the lack of a good workaround example are a show stopper for me using this. I am now commenting it out. Hope someone can think of a workaround!

--Jon Williams 10:21, 7 Feb 2007 (PST)

Hyperlink Include - issues for keyboard users (including Screen Reader users)

closed issue Issue is now resolved, main documentation requires inner text for hyperlinks, disallows hiding of links with negative margins.

Although invisible in visual user agents, and (according to the JAWS 7.0 test below) not spoken by screen readers (at least not by JAWS 7.0), empty links are still contained in the normal tab cycle. Users navigating via keyboard (or equivalent, e.g. switch access, puff/blow devices, etc) will still need to tab through the empty links (tested in Firefox 2.0, IE 6, IE 7; Opera 9.2 seems to remove empty links from tab cycle).

This can be verified by modifying the test page below, adding a regular link at the end of the 5 variations of empty links. It takes a user 6 tabs to arrive at the "real" link. It would therefore be advisable to rethink the approach, or scrap it completely.

-- Patrick H. Lauke 28 Apr 2007

Hyperlink Include - Screen Reader Testing

closed issue The documentation has been updated to reflect this research

Some concerns have been raised over the implications using empty hyperlinks may have on assistive devices such as screen readers. One concern is that an empty link may be read out, partially read out or result in some other confusing scenario for the user.

In response, a test page consisting of a number of empty hyperlinks in the style suggested by the pattern has been created. A 'good' result is that none of the links be read out.

Test Results from Yahoo! Accessibility Stakeholders Group

Tests by Mike Davies and members of the Yahoo! Accessibility Stakeholders group can be found at Empty Links and Screen Readers.

The conclusion is that the most accessible link is one that contains link text. Different techniques of hiding links, from no link text, through to hiding by CSS can cause an accessibility barrier to screen reader users. Each screen reader presented its user with a different set of problems and barriers.

The article contains tables describing the behaviors of different screen readers in a number of scenarios.

(added by: VinceVeselosky 05:46, 24 Jan 2008 (PST) )

Test Results: JAWS 7.0 with Firefox 1.5/Win

Tested by Frances Berriman 2006-07-21.

Purpose of this test was to ascertain what JAWS 7.0 would verbally announce to a user visiting the test case.

Was keyboard access fully tested (see above)? This test is not conclusive, as JAWS 7.0's behavior may well differ from other access technology. Further testing with a wider range of readers is strongly recommended. -- Patrick H. Lauke 28 Apr 2007

The example above has been incorrectly stated, to be honest. Conclusion was just a conclusion for that verbal test, not overall. Therefore, removed "Conclusion" line so it's not misleading! I concur with additional tests are vital (by as many people/softwares/scenarios as possible!). Phae 04:10, 2 May 2007 (PDT)

Proprietary attribute

closed issue HTML tidy on the test page gives:

Warning: <a> proprietary attribute "data"

The W3C validator is similarly unimpressed.

AndyMabbett 14:22, 22 Oct 2006 (PDT)

Use href

To clarify, links on the test page should be changed to use the href attribute as described at include-pattern (without href attributes, the elements probably won't register as hyperlinks, but anchors). Set title="" to fix empty link behavior for many assistive devices. --RichHall 23:31, 22 Oct 2006 (PDT)

Test page corrected

2006-10-25: This error has been corrected on the test page. Any tests should probably be re-run in light of this.

Unclear status

closed issue Resolved by explicitly stating that the include-pattern is a design pattern in the introduction, and the documentation itself now makes reference to which specifications the pattern applies to (and that specifications must explicitly cite the include-pattern, that it doesn't apply to everything.

It's not clear, either from the main Wiki page or include-pattern, whether this is an agreed standard, a draft, or just a proposal. AndyMabbett 03:14, 18 Oct 2006 (PDT)

Parsing for include-pattern

closed issue Note: this issue is obsolete. On a IRC conversation 2007-01-03, Mike Kaply admitted that he figured this out, which is to apply all includes first into the parse tree before looking for any properties. -Tantek

To be more specific, what finally occurred to me is that the object pattern is simply about grabbing nodes from another vcard and using them in this vcard. So the implementor responsibility is just to clone the dom node from the other vcard and replace the object with the corresponding nodes. Works great. (of course I also had to clone the entire vcard since I can't manipulate the DOM like that without changing the page) -mkaply

In an IRC discussion with Mike Kaply (author of the Operator extension for Firefox) we discussed the difficulty of parsing for an include-pattern in hResume. Mike asks:

I'm really wondering why the object stuff doesn't point back to the entire vCard. I don't understand why the spec has it point to individual items.

The problem was thought to be a weakness in the specification, which doesn't specify what part of the data is in the content that is pointed to by the object.

Currently, to overcome this a parser needs to follow this logic:

IF I don't find an fn, look for an object. IF there is an object, do a getelementbyid on that ID, but yet there was nothing about that object that said that the content I was looking for in the other card was an fn

Two things may help in overcoming this difficulty:

  1. Change the spec to have the include-pattern reference the entire vCard, with the intent that any data not found in this vCard use the other vCard
  2. Include the element of the reference, where the class attribute on <object> has "include" plus the element that needs to be included. For example:
<object
class="include fn" data="#vcard-name">myname</object> 

Additionally, I pointed out that using the <object> element to contain the reference makes Microsoft's Internet Explorer throw an error "Your current security settings prohibit ActiveX controls on this page. As a result, the page may not display correctly." Of course, there is no ActiveX content on an include-pattern.

Bob Jonkman 21:15, 2 Jan 2007 (PST)#

Concatenating values

closed issue This issue proposes a fragment URL structure that is incompatible with hyperlinks, and so cannot be integrated with the current include pattern mechanisms.

I feel that there should be a way to "include" data from two places, in one microformat property. For instance:

<span id="summaryA" class="summary">Kidderminster Branch Indoor Meeting</span>
<span id="summaryB>Janaury</span>

and later

<object data="#summaryB+#summaryA" class="include"></object>

would give a summary of:

January Kidderminster Branch Indoor Meeting

It may even be possible to include extra data:

<span id="summaryC>Fred Smith</span>
<object data="#summaryA+ with +#summaryC" class="include"></object>

to give:

Kidderminster Branch Indoor Meeting with Fred Smith

Andy Mabbett 14:33, 8 Jan 2007 (PST)

Why not use

<span class="value"><object data="#summaryA" class="include"></object> with <object data="#summaryB" class="include"></object></span>

to build

Kidderminster Branch Indoor Meeting with Fred Smith

Derrick Pallas 11:15, 31 Jan 2007 (PST)

Neat solution! Can anyone say whether current parsers accept this? Andy Mabbett 12:18, 31 Jan 2007 (PST)
Fully disclosure: My XSLT transformer supports this implicitly because it does include-pattern first, then pulls values. My only question would be what to do with nested @class="value" elements that could result from this. Derrick Pallas 12:35, 31 Jan 2007 (PST)

Script for client-side processing of include-pattern

closed issue Can you use the hyperlink option with DHMTL/Ajax to perform replacements in advanced browsers? (Simon Willison's getElementsBySelector() may be helpful)

 <a href="#id" class="include" title=""></a>

with something like:

 //Works only for linked include-pattern definition at microformats.org
 //Requires Simon Willison's getElementsBySelector()
 //  and normal IE workaround for addEventListener()
 addEventListener( window, 'load', function() {
   var myIncludes = document.getElementsBySelector( 'a[href].include' ), a, e;
   for( var i=0; a=myIncludes[i]; i++ ) if (a.href.charAt(0)=='#') {
     e = document.getElementsBySelector( a.href )[0].cloneNode( true );
     a.parentNode.replaceChild( e, a );
   }
 })

--RichHall 00:51, 23 Oct 2006 (PDT)

It seems there is some confusion around this topic. I believe that the included data are not supposed to be actually included in the point of inclusion. I believe it is only meant to be a hint for the microformats parser; but the inclusion pattern should not affect how the page is rendered. If that is true, let's clear out this page:

-- User:JiriKopsa 18 Mar 2007

For clarification, it is true that the spec *does* call for a microformat include to be ignored (content-neutral) when its data isn't being accessed. My Ajax suggestion is valid for those of us extracting microformat data client-side, but feel free to use it from an XHR callback instead of a window load event. Also, it would seem that without adjusting the DOM by cloning the repeated nodes, implementers would have to roll their own smart traversal functions rather than using built-in or well-defined CSS, XPath, E4X, etc. My feedback is that it's usually easier/faster to complete the tree than leave it sparse and memory-efficient, but it would be nice if the spec could leave enough wiggle room for both alternatives.
-- RichHall 12:47, 17 Dec 2007 (PST)

Template

Consider using this format (copy and paste this to the end of the list to add your issues; replace ~~~ with an external link if preferred) to report issues or feedback, so that issues can show up in hAtom subscriptions of this issues page. If open issues lack this markup, please add it.

Please post one issue per entry, to make them easier to manage. Avoid combining multiple issues into single reports, as this can confuse or muddle feedback, and puts a burden of separating the discrete issues onto someone else who 1. may not have the time, and 2. may not understand the issue in the same way as the original reporter.

<div class="hentry">
{{OpenIssue}} 
<span class="entry-summary author vcard">
 <span class="published">2011-MM-DD</span> 
 raised by <span class="fn">~~~</span>
</span>
<div class="entry-content discussion issues">
* <strong class="entry-title">«Short title of issue»</strong>. «Description of Issue»
** Follow-up comment #1
** Follow-up comment #2
</div>
</div>

Related Pages

include-pattern-feedback was last modified: Wednesday, January 7th, 2009

Views