W3C home > Mailing lists > Public > w3c-wai-ua@w3.org > July to September 2011

HTML5 should standardize markup for spelling/grammar errors

From: Greg Lowney <gcl-0039@access-research.org>
Date: Thu, 28 Jul 2011 01:30:56 -0800
Message-ID: <4E312C50.6090809@access-research.org>
To: WAI-UA list <w3c-wai-ua@w3.org>, Janina Sajka <janina@rednote.net>
Hi! The following has been added to the section of the UAWG wiki titled "Standard pieces of information should be automation-friendly" at http://www.w3.org/WAI/UA/work/wiki/HTML5_review_by_UAWG_notes#Standard_pieces_of_information_should_be_automation-friendly:

Added Greg Lowney <http://www.w3.org/WAI/UA/work/wiki/index.php?title=User:Glowney&action=edit&redlink=1> 08:23, 28 July 2011 (UTC)

*Use case:* Nadia is editing text on a web page, in a textarea or an element with contenteditable=true. Her browser's spelling checker is turned on, and the region has the spellcheck=true, so when the browser's spelling checker marks up spans with a red, wavy underline to indicate what it thinks is a spelling error, and a green, wavy underline to indicate what it thinks is a grammar error. Following the advice in the HTML5 spec (4.6.19 The mark element <http://www.w3.org/TR/html5/Overview.html#the-mark-element>), the browser marks up these phrases with |u| elements, distinguishing them using different classes. Unfortunately, these classes are meaningless to Nadia's screen reader, which is unable to distinguish them from ordinary underlines; that is, it has no idea what the classes mean, and whether they have semantic meaning or merely stylistic effects. If only they were marked up in a standardized way, her screen reader could use spoken phrases, audio icons, or inflections 
to indicate which ranges were flagged as spelling errors, etc.

*Recommendation:* HTML5 should define a standardized mechanism for marking up phrases flagged by a spelling checker or the like, so that content scripts or assistive technology could react to them intelligently. One option would be to extend the |mark| element with one or more new attributes, such as a |flag| attribute with enumerated type whose values could be |spelling| (e.g. "generral") or |grammar| (e.g. "He run"), or |syntax| (e.g. coding errors such as end if without preceding if), and also a |meaning| attribute that could use set to a user-friendly string that would convey the meaning of the markup to the user (e.g. <mark meaning="Character Set"> in a multilingual editor, or <mark meaning="Break Point"> in a debugger). Alternatively, a new element could be created for this purpose, rather than extending the use of the |mark| or |u| elements. (It's also worth noting that the important aspect of these indicators is *not* that they're underlines, but that they're spelling 
or grammar errors, and therefore using the |u| element is really inappropriate.)
Received on Thursday, 28 July 2011 08:33:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:40 UTC