-
Notifications
You must be signed in to change notification settings - Fork 641
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
Fix accessibility issue - role required when aria-expanded attribute is used #9445
Conversation
@@ -577,7 +577,7 @@ var hlp = new AccordionHelper(name, formModelStatePrefix, expanded, page); | |||
</div> | |||
if (!disabled) | |||
{ | |||
<div class="panel panel-default panel-collapse collapse @(expanded ? "in" : string.Empty)" | |||
<div role="form" class="panel panel-default panel-collapse collapse @(expanded ? "in" : string.Empty)" |
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.
This is for ALL expandable sections (seeing it's a ViewHelpers) right? Are all expandable sections truly forms?
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.
That's a good point, I don't believe they are all forms. Unfortunately, aria-expanded
attribute can only be used in a handful of roles. The sections that this div
element are used for vary significantly as far as I can tell. The roles that the aria-expanded
attribute can be used for are listed here. Any thoughts on this matter would be appreciated @joelverhagen @ryuyu
Addressed the issue pointed out by @joelverhagen. New fix is actually to remove the use of the |
Addresses #9415
Add a role to the
div
elements with thearia-expanded
attribute. The roleform
is likely the best option in these scenarios.