Fix exposure of overlapping spelling and grammar errors
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
People
(Reporter: Jamie, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
Bug 1909142 implements accessibility support for CSS custom highlights. However, it doesn't correctly handle exposure of overlapping spelling and grammar errors.
The way we expose spelling and grammar errors is based on IA2 and ATK. For a spelling error, we expose the object attribute invalid:spelling. Similarly, for a grammar error, we expose the object attribute invalid:grammar. IA2 and ATK want us to expose invalid:spelling,grammar when they overlap, but that doesn't work well for other API code such as Mac, which ideally needs to be able to check for a spelling error regardless of whether it is also a grammar error.
For now, we expose the one we most recently encountered. We need to find a way to fix this.
I've thought of two solutions:
- Add a new static atom for "spelling,grammar". The Mac code can then check for this as well as spelling. This is really hacky and I'm a bit reluctant to pollute the static atom table with such ugliness, even though it doesn't really cost us anything.
- Split spelling and grammar into separate attributes; e.g. spelling:true, grammar:true. We'd then need code to massage this to invalid:spelling/grammar/spelling,grammar for IA2 and ATK. This is a bit annoying because we'd need this code in two places, plus our tests currently depend on invalid:spelling, so we'd have to tweak all of those too (or make XPCOM expose invalid like IA2 and ATK).
I think it's unlikely that spelling and grammar errors will overlap. From what I've seen, word processors don't tend to report a grammar error in the presence of a spelling error. So, I don't think fixing this is high priority, but I thought it worth filing nevertheless.
Reporter | ||
Comment 1•29 days ago
|
||
Eitan, might you have an idea for a solution that sucks less than the two I've proposed?
Description
•