Skip to content

Conversation

HaoK
Copy link
Member

@HaoK HaoK commented Sep 29, 2021

Fix for https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1411043/

Adds area-current="page" on the currently selected nav item for the manage nav bar

Example html of when the change password is selected, null attributes are not rendered so its safe to attempt to set it on each item

<li class="nav-item"><a class="nav-link" id="profile" href="/Identity/Account/Manage">Profile</a></li>
 <li class="nav-item"><a class="nav-link" id="email" href="/Identity/Account/Manage/Email">Email</a></li>
 <li class="nav-item"><a class="nav-link active" id="change-password" aria-current="page" href="/Identity/Account/Manage/ChangePassword">Password</a></li>
  <li class="nav-item"><a class="nav-link" id="two-factor" href="/Identity/Account/Manage/TwoFactorAuthentication">Two-factor authentication</a></li>
  <li class="nav-item"><a class="nav-link" id="personal-data" href="/Identity/Account/Manage/PersonalData">Personal data</a></li>

@HaoK HaoK requested a review from Pilchie as a code owner September 29, 2021 21:36
@ghost ghost added the area-identity Includes: Identity and providers label Sep 29, 2021
@Tratcher Tratcher changed the title [Accessiblity] Set aria-current for manage nav [Accessiblity] Set area-current for manage nav Oct 1, 2021
@Tratcher Tratcher changed the title [Accessiblity] Set area-current for manage nav [Accessiblity] Set aria-current for manage nav Oct 1, 2021
@sebastienros
Copy link
Member

Was javascript an option talked about? Or do accessibility attributes/classes need to be defined server-side?

@HaoK
Copy link
Member Author

HaoK commented Oct 1, 2021

Is there a benefit/is it easier to using javascript, I just copied the pattern of the active attribute that was already doing something similar, but it was definitely a bit onerous

@HaoK HaoK merged commit 0cff8a7 into main Oct 5, 2021
@HaoK HaoK deleted the haok/aria branch October 5, 2021 04:26
@ghost ghost added this to the 7.0-preview1 milestone Oct 5, 2021
@HaoK
Copy link
Member Author

HaoK commented Oct 5, 2021

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2021

Started backporting to release/6.0: https://github.com/dotnet/aspnetcore/actions/runs/1306369041

@github-actions
Copy link
Contributor

github-actions bot commented Oct 5, 2021

@HaoK an error occurred while backporting to release/6.0, please check the run log for details!

Error: @HaoK is not a repo collaborator, backporting is not allowed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-identity Includes: Identity and providers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants