-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F87 and ARIA 24 seem to contradict in the use of CSS content property #1554
Comments
In the case of F87, the ARIA24 on the other hand uses So, not a contradiction I'd say (though F87 could probably do with some more recent note/clarification about current browser/AT support; and perhaps a better/more holistic angle here would also be that if the CSS fails to load or something, then all of a sudden your page would be missing actual text content for ALL users - AT and non-AT users alike - and that CSS-generated content will not generally/currently be indexed by search engines etc...so not relying on |
The rub is the check in F87 |
From memory, F87 was kept as folks from the low-vision task force were concerned that these types of icons / content disappear when fonts and/or CSS are over-ridden. I do wonder if it should be converted to a failure technique based more on font-icons, as that seems to be the more common example? A quick patch would be to get ARIA24 to use another CSS method than content (e.g. positioning of a background), but that's just a technicality. |
I think, as @mraccess77 suggests, that the main problem with F87 is the check that essentially says "test if content disappear with custom/no CSS, and if so it fails 1.3.1". that goes, i'd argue, way beyond what 1.3.1 normatively requires. or rather, it lacks nuance, as the same meaning/content may well be conveyed otherwise (with ARIA, or additional visually hidden text, etc), which does pass 1.3.1 / fulfill the requirement of being programmatically determinable. Yes, these latter ones won't help sighted users that also change/disable styles, but that's not the point of 1.3.1 per se. also, keeping in mind that even using pure CSS generated content does, in my view, pass 1.3.1, as the content is exposed correctly in the accessibility tree in modern browsers (something that didn't use to be the case years ago). if CSS is relied on, then this seems perfectly kosher to me. as such, I don't think F87 is a valid failure technique (in the sense that this always fails 1.3.1). rather, it's more of a best practice that goes beyond the normative ask of 1.3.1? |
Currently, CSS content is not supported at all by IE 11 and very poorly by Edge and Chrome, see FreedomScientific/standards-support#297. Chrome and Edge do not submit CSS content to the Accessibility API for labels of links, buttons, form fields, and groups. As a result, CSS content on interactive elements is not output as part of the label by the screen reader (JAWS, NVDA). The same applies to speech recognition software. CSS content is not recognized as part of the label by this software either, so that the elements cannot be controlled via Dragοn NatυrallySpeaking or Windows voice recognition, for example. Nonetheless, I am in favor of either removing F87 or formulating it to be compatible with ARIA24. If F87 remains, a warning could be included that CSS content should be taken into account when determining the Accessible Name according to the specification, but that this is unfortunately only poorly supported at present. |
How does the CSS Reader mode removes the author CSS and replaces it with reader-mode CSS. You can see how this works if you use DevTools Inspect after switching to reader mode on macOS Safari. Switching to reader mode strips all author CSS generated content - there's a good article that describes the problem here: Of note: Reader Mode in Safari 15 now seems to disable Reader Mode when pages contain CSS I think that means using CSS generated content interferes with a cognitive accessibility feature:
Edit: I've also observed a VoiceOver user switching to reader mode whenever possible to make pages simpler to read (so it's not just a cognitive accessibility problem) IMO that indicates F87 is useful (but probably needs revised for reader modes) and that there's a problem with ARIA24 |
the issue with reader mode there is that CSS is relied on as an accessibility supported technology, but then reader mode simply drops it on the floor. arguably a failing/shortcoming of reader mode. question then is does the fact that reader mode does away with this effectively invalidate all reliance on CSS as accessibility supported technology, or is reader mode essentially an outlier and it can be said that it's fine to rely on CSS because users have technologies readily available at their disposal (i.e. NOT enabling reader mode) to still access the content as authored. |
I guess it depends on whether user stylesheets need to be taken into account when relying on CSS (ARIA24 implies they are). You could view Reader Mode as an extreme example of a user stylesheet - this user.css would have much the same effect:
Fundamentally the problems with content: are because it creates content in the style layer - there are some other browser bugs / spec problems related to this which impact accessibility:
... but there are also some good use cases where using it increases accessibility: ... but Wayne's analysis is still relevant: |
as user styles can completely break an experience even if it doesn't rely on CSS (just a silly ARIA24 could do with being tweaked/updated (as mentioned earlier in the thread) as yes, it seems to enshrine the idea that user styles DO need to be taken into account. and F87 is now a bit long in the tooth and hasn't really kept up pace with browser changes since 2008... (as is the case with many 2.0 techniques) |
This came up in a discussion with @jnurthen today and we think that this failure is not valid and should be removed. Want me to make a PR to remove it? :) |
+1 for deletion |
Rationale: this is not *always* a failure. User agent/screen reader support has improved considerably since the technique was first devised, with most (all?) combinations now happily reading/announcing CSS-generated content. Supersedes #2800 (which was having too many merge conflicts due to its age) Closes #1554, closes #3781
Rationale: this is not *always* a failure. User agent/screen reader support has improved considerably since the technique was first devised, with most (all?) combinations now happily reading/announcing CSS-generated content. Supersedes #2800 (which was having too many merge conflicts due to its age) Closes #1554, closes #3781
ARIA24 example 3 (and maybe others) indicates the content property can be used while F87 says it can't be relied upon.
The text was updated successfully, but these errors were encountered: