tech support 8

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, 19 April 2011

Image alt Attributes Not Always Required in HTML5

Posted on 20:44 by Unknown


W3C 'Official' HTML5 logo
It has long been accepted that the alt attribute of the <img> element, while not a perfect method to provide a text alternative to an image, is still a necessary attribute to provide at least some level of access to the image content for users who cannot see the image (whether by disability or otherwise).




The alt attribute is required on images in HTML 4.01. The notion that the alt is a de facto required attribute in future versions of HTML is echoed in the WCAG version 1.0 and 2.0 (7.1 of WCAG 1.0, H67 and F38 of WCAG 2.0). It is even stated as much in the latest W3C HTML5 working draft document, HTML5: Techniques for providing useful text alternatives, as you can see in this sample conformance item:




When an image is decorative and it is the authors intent that it not convey any information, an empty alt attribute SHOULD be considered as an indication that the image can be safely ignored.



The W3C uses the strongest language in its arsenal when it says an alt should be used, even in this example of an empty attribute.




Yesterday the W3C mailing list rendered a decision on Issue-31 and Issue-80 (a combined issue). This issue was last reported by Ian Hickson of WHATWG on the W3C mailing list. Confusing though that may be, it's still a decision on the W3C list. The issue summary (not the decision):




Require that authors include alternative text for images. Provide detailed instructions and examples for doing so to all readers of the HTML specification.



The decision as outlined on the mailing list:





  • The presence of aria-labelledby does not make missing alt conforming.

  • The presence of role=presentation does not make missing alt conforming.

  • The presence of <meta name=generator> makes missing alt conforming.

  • Use of private communications does not, in itself, make missing alt conforming.

  • The presence of title makes missing alt conforming.

  • The presence of figcaption makes missing alt conforming.





Essentially, if you use a title attribute on your image, or wrap it in a <figure> with an associated <figcaption>, then you may exclude the alt attribute. In addition, the presence of a <meta name=generator> element, which implies the HTML was generated by some sort of WYSIWYG editor or automated tool, also makes the absence of an alt attribute valid.




There are arguments on both side of the issue, and the decision handed down on the mailing list does a good job of collecting them, even if the qualification of each may be cause for dissent. Given that the W3C is pushing HTML5 to Last Call status next month, it's unlikely this will change.



Warning: Opinion




An alt attribute is intended to describe the image to which it is affixed, but the (redundant) title attribute has been implemented by authors to provide more value to users owing to browsers typically rendering it as a tool-tip. While this doesn't preclude an author from inserting an alt as well, it also may result in use of solely the title when it may not offer a sufficient description of the image.




The argument for excluding alt in the presence of a <figure> and associated <figcaption> element applies best when the browser supports those elements. In time they will, but given the collection of users still on IE6, older assistive technologies, and the lack of understanding of these new elements, this leaves a gap for some users. This isn't a clean transition with a guarantee of the same level of accessibility as outlined in the current HTML 4.01 specification and accompanying WCAG versions.




I do not agree with letting an HTML page off the hook simply because it has been generated by an automatic tool of some sort (relying on the <meta name=generator> block of code). This is really included to allow generated HTML5 to validate, not because the tools are incapable of inserting a blank attribute value (though they may not have been coded to do so). The argument against this references the current lack of support for ATAG guidelines within HTML editors and generators. I think this caters to ego by allowing authors to claim validation that would otherwise fail.




In the end, I think the best approach (at least for web developers and authors) is to still require it in all cases, reducing the need for seasoned web developers to retrain themselves. Ideally, these web developers would still continue to include alt attributes in all cases. Developers of HTML editors/generators (who care about the output) will hopefully follow suit instead of inserting additional complexity at the risk of misunderstanding (and mis-coding) these new rules. Makers of HTML editors/generators that cannot implement the spec should not be given a free pass.





If you're really interested in <img> attributes on the chopping block, read up on the fun regarding longdesc at longdesc in HTML5.



Update: April 27, 2011




Steve Faulkner, member of W3C HTML Working Group along with other W3C working groups, provides a more in-depth and detailed overview, including a re-hash of the full decision in his post HTML5 Accessibility Chops: the alt decision.

Read More
Posted in accessibility, html, standards, W3C, WCAG, whatwg | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • Browser Performance Chart
    Jacob Gube has posted a handy chart over at Six Revisions titled " Performance Comparison of Major Web Browsers ." He tests the c...
  • Google Dashboard: What Google Knows about You
    Google announced a new service/feature today, Google Dashboard . Given all the services Google offers and all the ways you can interact with...
  • Facebook, HTML5, and Mis-Reporting
    My Twitter stream and the headlines of sites across the web yesterday lit up with Facebook's CEO blaming its stock price (failure to mee...
  • App Store Meta Tags
    Why yes, Dominos, I'd love to tap again to get your real home page to order a pizza when I could have done it right here, below your ove...
  • Speaking at Mom 2.0 in Houston, TX
    I will be in Houston this week to speak at the Mom 2.0 Summit (Feb. 18-20, 2010, Houston, TX). To make it a little easier to describe, here...
  • Codepen Has Handy Sharing Tools for Devs
    There are plenty of online resources for playing around with code right in the browser, no server of your own needed, that you can then shar...
  • History of Eye-Tracking as Research Tool
    If you've ever wondered what eye-tracking is and where it came from, there is a historical breakdown in the article A Brief History of E...
  • Opera: Presto! It's now WebKit
    Opera is replacing its Presto rendering engine with WebKit (Chromium, really, when you factor in the V8 JavaScript rendering engine). Big n...
  • The Science of Trust in Social Media
    I am one of those people who always needs to see proof of some assertion, evidence to back up a claim. While I can accept anecdotal evidence...
  • Developer Discusses Dyslexia and Dyscalculia
    Sabrina Dent , a web designer hailing from Ireland, has blogged about her struggle with dyslexia and dyscalculia and web applications today...

Categories

  • accessibility
  • Adobe
  • analytics
  • Apple
  • apps
  • ARIA
  • Bing
  • Blink
  • Brightkite
  • browser
  • Buzz
  • Chrome
  • clients
  • css
  • design
  • Facebook
  • Firefox
  • Flash
  • fonts
  • food
  • Foursquare
  • g11n
  • geolocation
  • globalization
  • Google
  • Gowalla
  • html
  • i18n
  • ICANN
  • infographic
  • Instagram
  • internationalization
  • internet
  • Internet Explorer
  • JavaScript
  • JAWS
  • Klout
  • L10n
  • law
  • localization
  • Lynx
  • Mapquest
  • Microsoft
  • mobile
  • Netscape
  • ning
  • Opera
  • patents
  • picplz
  • Plus
  • print
  • privacy
  • project management
  • QR
  • rant
  • RSS
  • Safari
  • SCVNGR
  • search
  • SEM
  • SEO
  • social media
  • Sony
  • speaking
  • standards
  • SVG
  • touch
  • translation
  • Twitter
  • typefaces
  • usability
  • UX
  • Verizon
  • video
  • W3C
  • WAI
  • WCAG
  • WebKit
  • whatwg
  • Wired
  • WOFF
  • xhtml
  • Yahoo
  • YouTube

Blog Archive

  • ►  2013 (39)
    • ►  December (1)
    • ►  November (7)
    • ►  September (4)
    • ►  July (3)
    • ►  June (2)
    • ►  May (5)
    • ►  April (3)
    • ►  March (6)
    • ►  February (2)
    • ►  January (6)
  • ►  2012 (63)
    • ►  December (2)
    • ►  November (4)
    • ►  October (5)
    • ►  September (5)
    • ►  August (4)
    • ►  July (6)
    • ►  June (7)
    • ►  May (7)
    • ►  April (8)
    • ►  March (5)
    • ►  February (3)
    • ►  January (7)
  • ▼  2011 (67)
    • ►  December (5)
    • ►  November (7)
    • ►  October (5)
    • ►  September (4)
    • ►  August (8)
    • ►  July (3)
    • ►  June (8)
    • ►  May (3)
    • ▼  April (1)
      • Image alt Attributes Not Always Required in HTML5
    • ►  March (6)
    • ►  February (6)
    • ►  January (11)
  • ►  2010 (100)
    • ►  December (8)
    • ►  November (7)
    • ►  October (5)
    • ►  September (10)
    • ►  August (7)
    • ►  July (11)
    • ►  June (12)
    • ►  May (6)
    • ►  April (8)
    • ►  March (10)
    • ►  February (5)
    • ►  January (11)
  • ►  2009 (51)
    • ►  December (9)
    • ►  November (6)
    • ►  October (21)
    • ►  September (13)
    • ►  August (2)
  • ►  2003 (3)
    • ►  October (1)
    • ►  January (2)
  • ►  2002 (9)
    • ►  December (1)
    • ►  June (3)
    • ►  April (1)
    • ►  March (3)
    • ►  January (1)
  • ►  2001 (1)
    • ►  February (1)
  • ►  2000 (4)
    • ►  October (1)
    • ►  July (1)
    • ►  June (1)
    • ►  January (1)
  • ►  1999 (7)
    • ►  November (1)
    • ►  September (2)
    • ►  August (2)
    • ►  July (1)
    • ►  June (1)
Powered by Blogger.

About Me

Unknown
View my complete profile