-
Notifications
You must be signed in to change notification settings - Fork 779
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
Support expanded definition list rule in the WHATWG HTML spec which allows for divs as parents of dt/dds #262
Comments
@Blackbaud-MattGregg the WHATWG spec is a "living document", do you know what the support is from an accessibility perspective of definition lists with |
I can't say that I do though I'm not sure what you mean by "support from an accessibility perspective"...do you mean screenreaders can handle this without issues or something else? Mozilla has it in their HTML reference https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl#Wrapping_name-value_groups_in_<div>_elements and stated at least at one point they follow WHATWG when they differ (https://developer.telerik.com/featured/w3c-vs-whatwg-html5-specs-differences-documented/). However, I don't know what is really implemented from an accessibility perspective or browser accessibility tree. |
We need to verify equivalent semantic exposure by all browsers on all platforms in the accessibility tree. I have verified Safari: OS X + VoiceOver @marcysutton @WilcoFiers can you verify other platforms? |
Gotcha. I'm not sure what you do to verify, but let me know if there is something I could chip in on. On Mac Chrome when I look at two version of the a11y in the inspector this is what is shows
then with div
The ignored div properties read out as "Accessibility node not exposed Element not interesting for accessibility." |
I did three things to validate support:
In your example, it would be failing number 3 - but this Chrome on Mac is not a supported platform anyway, so that does not matter. Also having the only difference be "ignored" would be ok as long as the other two tests pass. Important are: Windows, IE, JAWS 18 iOS, Safari, VO extra credit Android, Firefox, Talkback |
Hi, any ideas when this will get added? Is there a way I disable this rule for now as it's making my tests fail? |
+1 ping on this as well. We also noticed this in our project. If there's gonna be a timeline on when the rule will be updated it will be much appreciated :) |
@glouischandra Appreciate the ping. We need to properly test that this works well in assistive technologies as Dylan suggested. If you can provide the test data, that'd be much appreciated. |
I do not currently use any accessibility inspector, however I do have ChromeVox (v. 53.0.2784.5) installed on my Windows pc, and the screen reader reads out the HTML structure for the tests:Classic
|
Thanks for the test. We'll need results from the screen readers Dylan mentioned above: Windows, IE, JAWS 18 |
Did a test with NVDA 2017.4 on Windows, Firefox 57.0.2 using the exact same In both cases the document was read out the same, and the NVDA Speech viewer logged:
The |
Excellent. VoiceOver seems okay with it as well. |
Does anyone have an Android device they can test with TalkBack? In iOS Safari+Voiceover, none of the roles are read aloud for me when I swipe through, just the content ("description term", "description definition"). Adding a DIV doesn't seem to make a difference. |
@marcysutton ask @chriscm2006 if he can do the test or give @isner a device to test in A2 |
I tested the markup on my Samsung Galaxy S8, Android Results were consistent with or without Also I believe there are issues in general using Voice Assistant, even reaching something simple as ConclusionNo difference in how |
We checked internally as well and have confirmed the findings. We should allow this in axe-core. |
Thumbs up on this one, as well. Interesting finding: The only way NVDA 2017.2 through 2018.1 correctly report the number of groupings in the list (dt + 1 or more dd) is if you use divs as containers for the groupings. My results:
In addition, it is worth noting that HTML 5 now explicitly allows using divs to group: |
Allow div elements to group content inside of dl elements. Closes #262 ## Reviewer checks **Required fields, to be filled out by PR reviewer(s)** - [x] Follows the commit message policy, appropriate for next version - [x] Has documentation updated, a DU ticket, or requires no documentation change - [x] Includes new tests, or was unnecessary - [x] Code is reviewed for security by: Jey
I'm still getting these errors:
On HTML I've plucked from the test files: I'm using gulp-axe-webdriver with axe-core 3.1.1.
I noticed some changes from this issue were overwritten and are not included in the 3.1.1 release. Could this be the issue? Or am I missing something in my setup? Thanks for your help! |
Thumbs upping this one, again. The fix seems to have been reverted. As of axe-core 3.1.2 an dl > div > dt+dd still causes a violation of "dl-item" (though not "definition-list"). |
We're hitting this issue as well Downloaded Axe for the first time today - release 3.8.0 - and its reporting errors with the |
@jebw @kensgists Sorry it's taken awhile to respond. If you're still seeing issues please open a new issue so we can track this better. |
I was wondering if the definition list rule would or should ever be expanded to the WHATWG HTML spec which seems to allow for divs as parents of dt/dds (https://html.spec.whatwg.org/multipage/semantics.html#the-dl-element) if screen readers/browsers support this (I don't know if they do)? I imagine the WCAG is strict to the W3C's HTML5 spec, but don't know for sure.
I've had this come up and trying to figure out how to avoid disabling this rule or find some other semantic markup for the relationships given the divs can't be changed.
The text was updated successfully, but these errors were encountered: