-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[SolidusAdmin] Remove inaccessible details/summary element #5835
Conversation
The variant search on the order#show page utilized a `details`/`summary` HTML element in order to get open/close functionality. However, Axe flags this as inaccessible, because the `summary` element does not have a label. This removes the `summary` element in favor of a simple div, and changes the controller to rely on a `hidden` class instead.
@mamhoff wow, that's new to me. Can you link any resource supporting the fact that the summery element is not accessible? Maybe there's some workaround for that so we can use the native HTML element? |
The error we get from Axe references this: https://dequeuniversity.com/rules/axe/4.10/summary-name It's not that the element is not accessible, it's that the summary (which is hidden, and never clicked in this instance) does not have a label. IMO I don't think this is a case for the |
I am confused as well. Could we add an aria-label?
|
I agree that |
But - there is no button. The previous version used the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. thank you very much for giving this context. I now wholeheartedly agree with you that this must be a div
. one could argue for a ul li
structure or dt dl
, datalist
, whatnot. but in the end it does not matter that much and the immediate issue is resolved. we can rework the variant select anytime, but not in this PR
For future reference: This is the ideal candidate for a |
Installer Test is unrelated to this change. Since this blocks all open PRs right now, merging. |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Thanks for this @mamhoff ! |
Summary
The variant search on the order#show page utilized a
details
/summary
HTML element in order to get open/close functionality. However, Axe flags this as inaccessible, because thesummary
element does not have a label. This removes thesummary
element in favor of a simple div, and changes the controller to rely on ahidden
class instead.This should fix our currently failing builds.