- Issue created by @clayfreeman
- Merge request !8744Dialog buttons do not inherit accessibility-related attributes β (Open) created by clayfreeman
- πΊπΈUnited States clayfreeman Paragould, AR
Would appreciate an expert's review to ensure the work is sufficient :)
- Status changed to Needs review
5 months ago 4:36pm 11 July 2024 - πΊπΈUnited States clayfreeman Paragould, AR
Pipeline seems to have passed; ready for manual review now.
- Status changed to RTBC
5 months ago 7:39pm 16 July 2024 This looks good to me. All the new attributes are copied over in the submit button when a form is loaded in a modal.
- Status changed to Needs work
4 months ago 5:04am 26 July 2024 - Status changed to Needs review
4 months ago 3:00pm 26 July 2024 - πΊπΈUnited States clayfreeman Paragould, AR
I don't believe the follow-up is needed, or at least it shouldn't block the work being done here. I'm happy to entertain the proposed change if Drupal core is willing to take on such a task, but I doubt the likelihood of that outcome.
I'll post in #accessibility -- thanks for the suggestion.
- πΊπΈUnited States smustgrave
small comment on MR
Ran test-only feature though to check test coverage
1) Drupal\FunctionalJavascriptTests\Ajax\DialogTest::testDialog Failed asserting that false matches expected true. /builds/issue/drupal-3460846/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php:188 FAILURES! Tests: 2, Assertions: 53, Failures: 1.
Which shows it
Did a manual test (very similar to the actual test)
Went to ajax-test/dialog
Clicked Link 5
Verified the "Hello world" button had no aria attributesWent to /ajax-test/dialog-form
Verified the attributes were thereSo fix does address the problem described.
Will leave in review for others and that nitpicky variable name (can mark after that).
- πΊπΈUnited States smustgrave
Forgot about inline editor so made the change myself
Will try and get accessibility sign off.
- π¨π¦Canada mgifford Ottawa, Ontario
Took a look at the code and it seemed reasonable. @smustgrave thanks for doing the manual testing. Would be nice to get it in.
- Status changed to RTBC
3 months ago 5:56pm 14 September 2024 - π·πΈSerbia finnsky
Btw. Probably we also need to discuss.
Why we not copy ALL attributes here?If we need exact copy of original button it has sence
- πΊπΈUnited States smustgrave
Letβs open a follow up for that. Getting this in as js least helps accessibility
- Status changed to Needs work
3 months ago 7:51pm 14 September 2024 - π·πΈSerbia finnsky
I would like to see something better than just copy. :)
https://codepen.io/finnsky/pen/qBzGNoZ?editors=1010
Here i added example how it may work.
- πΊπΈUnited States itmaybejj
Looking this source code over (have not pulled a test environment) --
I would not drop aria-describedby and aria-labelledby if the targets are rendered on the page. I see your logic, but if those attributes are present for some reason, won't they be equally needed in the duplicate?
Also -- I'm assuming if there is no aria-label on the source, this code won't put that attribute on the target, as opposed to putting an empty aria-label? I've seen the latter sneak through now and then.
And last -- aria-details does not have widespread support. It doesn't hurt to copy the attribute, but developers really should not be using this attribute in production code.