Skip to content

Commit 26d3e1b

Browse files
Fix accessibility issue - role required when aria-expanded attribute is used (#9445)
* add button role when using aria-expanded attribute * add form role when using aria-expanded attribute * remove redundant and incorrect use of aria-expanded attribute
1 parent 0c30b2e commit 26d3e1b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/NuGetGallery/App_Code/ViewHelpers.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,8 @@ var hlp = new AccordionHelper(name, formModelStatePrefix, expanded, page);
577577
</div>
578578
if (!disabled)
579579
{
580-
<div class="panel panel-default panel-collapse collapse @(expanded ? "in" : string.Empty)"
581-
aria-expanded="@(expanded ? "true" : "false")" id="@id-container">
580+
<div aria-controls="panel-body" class="panel panel-default panel-collapse collapse @(expanded ? "in" : string.Empty)"
581+
id="@id-container">
582582
<div class="panel-body">
583583
@content(MvcHtmlString.Empty)
584584
</div>

0 commit comments

Comments
 (0)