Skip to content

feat(router): add ariaCurrentWhenActive input to RouterLinkActive directive#45167

Closed
dario-piotrowicz wants to merge 1 commit intoangular:masterfrom
dario-piotrowicz:routerLink-active-aria-current
Closed

feat(router): add ariaCurrentWhenActive input to RouterLinkActive directive#45167
dario-piotrowicz wants to merge 1 commit intoangular:masterfrom
dario-piotrowicz:routerLink-active-aria-current

Conversation

@dario-piotrowicz
Copy link
Contributor

@dario-piotrowicz dario-piotrowicz commented Feb 22, 2022

add the ariaCurrentWhenActive input to the RouterLinkActive directive so that
users can easily set the aria-current property to their active router
links

resolves #35051

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #35051

No build-in way to set the aria-current attribute to active routerLinks is present

What is the new behavior?

A new option has been added to the RouterLinkActive directive which sets the aria-current value when the link is active

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@dario-piotrowicz
Copy link
Contributor Author

@atscott This PR is still in draft, but I was wondering if you'd like to have a quick initial look to see if I am going into the right direction 🙂

@dario-piotrowicz dario-piotrowicz force-pushed the routerLink-active-aria-current branch from 0eac59f to 3d805c7 Compare February 23, 2022 20:59
@dario-piotrowicz
Copy link
Contributor Author

dario-piotrowicz commented Feb 23, 2022

TODOs:

@dario-piotrowicz dario-piotrowicz changed the title feat(router): add ariaCurrent input to RouterLinkActive directive feat(router): add ariaCurrentWhenActive input to RouterLinkActive directive Feb 23, 2022
@dario-piotrowicz dario-piotrowicz force-pushed the routerLink-active-aria-current branch 2 times, most recently from 48405eb to 5f87e2f Compare February 23, 2022 22:46
@ngbot ngbot bot added this to the Backlog milestone Feb 24, 2022
@dario-piotrowicz dario-piotrowicz force-pushed the routerLink-active-aria-current branch 2 times, most recently from d8bfaa0 to 0eea389 Compare February 25, 2022 20:40
@dario-piotrowicz dario-piotrowicz marked this pull request as ready for review February 25, 2022 20:42
@pullapprove pullapprove bot requested a review from alxhub February 25, 2022 20:42
@dario-piotrowicz dario-piotrowicz force-pushed the routerLink-active-aria-current branch from 0eea389 to 21d0c88 Compare February 26, 2022 11:33
Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments but otherwise LGTM. Adding my approval so this can move forward to public API review.

@atscott atscott added the target: minor This PR is targeted for the next minor release label Feb 28, 2022
@dario-piotrowicz dario-piotrowicz force-pushed the routerLink-active-aria-current branch from bbe7380 to fff230d Compare February 28, 2022 18:34
@dario-piotrowicz
Copy link
Contributor Author

@atscott I'm so sorry one commit got somehow lost in my other notebook and what you reviewed was missing some changes, I have amended the thing (but had to rebase and squash the commits 😓), please have another look, so sorry for the inconvenience 😓

Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍪

reviewed-for: fw-animations, public-api

@jessicajaniuk jessicajaniuk removed the request for review from alxhub February 28, 2022 18:44
Copy link
Contributor

@dylhunn dylhunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

@AndrewKushnir AndrewKushnir removed their request for review March 2, 2022 01:31
@dario-piotrowicz dario-piotrowicz force-pushed the routerLink-active-aria-current branch 3 times, most recently from ec43678 to f552300 Compare April 9, 2022 13:11
@dylhunn
Copy link
Contributor

dylhunn commented Apr 15, 2022

@atscott From reading the above thread, it sounds like we decided to stick with this approach? Please let me know if it needs to be merged (after the one docs comment is fixed), thanks :)

@atscott atscott force-pushed the routerLink-active-aria-current branch from f552300 to 7e9017e Compare April 15, 2022 20:01
@atscott
Copy link
Contributor

atscott commented Apr 15, 2022

presubmit

@atscott atscott added the action: presubmit The PR is in need of a google3 presubmit label Apr 15, 2022
…ective

add the ariaCurrentWhenActive input to the RouterLinkActive directive so that
users can easily set the aria-current property to their active router
links

resolves angular#35051
@atscott atscott added action: merge The PR is ready for merge by the caretaker and removed action: presubmit The PR is in need of a google3 presubmit labels Apr 20, 2022
@atscott atscott force-pushed the routerLink-active-aria-current branch from 7e9017e to d8ab42d Compare April 20, 2022 20:41
@atscott
Copy link
Contributor

atscott commented Apr 20, 2022

This PR was merged into the repository by commit dea8c86.

@atscott atscott closed this in dea8c86 Apr 20, 2022
@dario-piotrowicz dario-piotrowicz deleted the routerLink-active-aria-current branch April 20, 2022 22:20
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: router target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[a11y] - Document best practice for use of aria-current with RouterLink / RouterLinkActive

6 participants