Thoughts on <details> versus @summary
February 25th, 2010I originally sent these out as a series of tweets on twitter. It was late at night on the west coast, so likely most were asleep when I pumped them out. I hope to expand on these further, but for now, my bullet points:
- Elements are better than attributes; for semantics, javascript, css
- If something needs to be referenced you should normally make it an element, with an id attribute. (aria-describedby?)
- If something represents a separate entity, make it an element: you might want to add attributes later
- Because <details> is an element, it can be easily styled and scripted; ditto for <button>
- Complex tables need explaining to more than just blind: low vision users with screen magnifiers, dyslexics and other cognitive needs users, etc.
- <details> could take <ul>’s – cognitive studies suggest lists are easier ways of collecting data than reading paragraphs
- The <details><button></details> pattern can likely be reused for other accessibility related needs: I’m thinking as a replacement to longdesc as well: <img><details><button></details></img>
- The reality: both summary & longdesc, while great ideas, didn’t gain widespread take-up & have been seriously abused
- Both summary & longdesc will always be honored by user-agents that support HTML4 – they’re not going to disappear overnight.
Hey! I'm John Foliot, and this is my personal blog.
People born in the Year of the Pig are chivalrous and gallant. Whatever they do, they do with all their strength. For Boar Year people, there is no left or right and there is no retreat. They have tremendous fortitude and great honesty. They don't make many friends but they make them for life, and anyone having a Boar Year friend is fortunate for they are extremely loyal. They don't talk much but have a great thirst for knowledge. They study a great deal and are generally well informed.