Difference between revisions of "User:Eoconnor/ISSUE-206"

From HTML WG Wiki
Jump to: navigation, search
m (typo)
m (allow conformance checkers to warn about relaxed="")
Line 15: Line 15:
 
The spec currently allows conformance checkers to waive <code>alt=""</code> conformance requirements on pages with <code>&lt;meta name=generator></code> present. This feature is intended to allow sites like [http://www.flickr.com Flickr] (which accept bulk photo uploads from their users and can't reasonably require their users to provide alternative text) to check the conformance of their Web applications without being inundated with warnings or errors that the site developers can't do anything about.
 
The spec currently allows conformance checkers to waive <code>alt=""</code> conformance requirements on pages with <code>&lt;meta name=generator></code> present. This feature is intended to allow sites like [http://www.flickr.com Flickr] (which accept bulk photo uploads from their users and can't reasonably require their users to provide alternative text) to check the conformance of their Web applications without being inundated with warnings or errors that the site developers can't do anything about.
  
This is an important use case to address, but there are two problems with the current design of this feature:
+
This is an important use case to address, but there are two problems with this feature as currently specified:
  
 
=== Deployment ===
 
=== Deployment ===
Line 33: Line 33:
 
== Details ==
 
== Details ==
  
In §4.8.1 "The img element," add a <code>relaxed=""</code> boolean attribute to the <code>&lt;img></code> element.
+
In §4.8.1 "The img element," add a <code>relaxed=""</code> boolean attribute to the <code>&lt;img></code> element. Define the attribute like so:
  
The <code>relaxed=""</code> attribute indicates by its presence that the <code>&lt;img></code> element's content was provided by a different author than that of the embedding document.
+
<blockquote>The <code>relaxed=""</code> attribute indicates by its presence that the <code>&lt;img></code> element's content was provided by a different author than that of the embedding document.</blockquote>
  
 
In §4.8.1.1.12 "Guidance for markup generators," add the following paragraph after the paragraph which begins with "As a last resort…":
 
In §4.8.1.1.12 "Guidance for markup generators," add the following paragraph after the paragraph which begins with "As a last resort…":
Line 43: Line 43:
 
In §4.8.1.1.13 "Guidance for conformance checkers," replace the second bullet (which starts with "The document has a meta element…" with the following text:
 
In §4.8.1.1.13 "Guidance for conformance checkers," replace the second bullet (which starts with "The document has a meta element…" with the following text:
  
* The <code>&lt;img></code> element has a <code>relaxed=""</code> attribute specified.
+
* The <code>&lt;img></code> element has a <code>relaxed=""</code> attribute specified. Conformance checkers may choose to report this error; for example, there could be a user option to report conformance errors for this case.
  
 
== Impact ==
 
== Impact ==

Revision as of 22:04, 31 July 2012


Mint a new attribute for relaxing alt attribute conformance criteria in certain situations

Summary

To enable large Web applications to effectively monitor their own markup quality, without enroaching on markup generators' existing efforts to market their tools, we should mint a new relaxed="" attribute for <img> elements which allows for the granular relaxation of certain author conformance requirements.

This is for ISSUE-206 meta-generator.

Rationale

The spec currently allows conformance checkers to waive alt="" conformance requirements on pages with <meta name=generator> present. This feature is intended to allow sites like Flickr (which accept bulk photo uploads from their users and can't reasonably require their users to provide alternative text) to check the conformance of their Web applications without being inundated with warnings or errors that the site developers can't do anything about.

This is an important use case to address, but there are two problems with this feature as currently specified:

Deployment

The <meta name=generator> feature has been present in HTML for many years; in 1997, 7.5% of web pages had <meta name=generator> specified. [1] In all that time, <meta name=generator> has had no effect on the criteria used when checking the conformance of web pages containing it. Most if not all tools which emit <meta name=generator> have not intended to affect the conformance of documents by doing so—they simply emit <meta name=generator> as a means of marketing their tools to potential users.

Authors or mantainers of popular tools such as Blue Griffon and HTML Tidy have expressed a) that they will not stop emitting <meta name=generator>, and b) that their users do not expect alt="" conformance requirements to be relaxed on content generated with these tools. [2] [3]

Granularity

The <meta name=generator> exception is document-wide. The markup of large Web applications is typically partly generated from code and partly sourced from hand-authored HTML templates. With an all-or-nothing mechanism, there's no way to relax the conformance criteria for only the portions of the document corresponding to user-generated content, while retaining strict requirements on the portions of markup from the hand-authored HTML templates.


Given these deficiencies, this Change Proposal proposes to address the given use case with a granular mechanism that does not overlap with an already-existing markup practice.

Details

In §4.8.1 "The img element," add a relaxed="" boolean attribute to the <img> element. Define the attribute like so:

The relaxed="" attribute indicates by its presence that the <img> element's content was provided by a different author than that of the embedding document.

In §4.8.1.1.12 "Guidance for markup generators," add the following paragraph after the paragraph which begins with "As a last resort…":

Generators may mark <img> elements without alt="" attributes with the relaxed="" attribute when the <img> element's lack of alternative text should not affect the conformance of the rest of the document.

In §4.8.1.1.13 "Guidance for conformance checkers," replace the second bullet (which starts with "The document has a meta element…" with the following text:

  • The <img> element has a relaxed="" attribute specified. Conformance checkers may choose to report this error; for example, there could be a user option to report conformance errors for this case.

Impact

Positive Effects

  • We no longer imbue <meta name=generator> with effects incompatible with its historical and deployed usage;
  • We enable engineers of large Web applications to catch markup errors that they can do something about, without bothering them about markup errors they can't do anything about.

Negative Effects

  • None

Conformance Classes Changes

  • This change alters the following conformance classes:
    • Conforming documents,
    • Conformance checkers, and
    • Authoring tools and markup checkers.

Risks

  • Authors may simply add relaxed="" to all of their <img> elements to avoid authoring good alternative text.

References

References are linked inline.

Contributors

  • Edward O'Connor