Why do some micro-formats use the abbr tag? It may cause some accessibility issues.

The party is on <abbr class="dtstart" title="2005-10-10">the 10th</abbr>.
有帮助吗?

解决方案

You are correct, it's a significant accessibility issue; in 2008, the BBC stopped using the hCalendar microformat on their site for this reason.

As far as I can tell, the reason that the ABBR tag was used in this was was because the Microformat designers needed some existing HTML tag and attribute that they could re-purpose that would not have any other side-effects. (They couldn't invent a new HTML tag, since it would then fail to validate with existing pages; one goal with microformats is to be able to easily add them to existing pages.) ABBR+TITLE doesn't change the appearance or layout, so they likely assumed it was safe to use, and didn't realize at the time that TITLE can be read out by screenreaders, so needs to be human-readable, not a machine-readable string.

Or, put another way, they simply weren't aware that ATTR's TITLE can be used for accessibility.

There's some background on why the abbr approach was chosen ad this page.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top