Skip to content
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

refactor(select): use aria-activedescendant to manage focus #6856

Merged
merged 1 commit into from
Oct 3, 2017

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Sep 5, 2017

  • Refactors the select to use aria-activedescendant to announce the highlighted item to screen readers. Previously we would do this through focus, however using focus prevents us from being able to do things like feat(select): add md-select-header directive #3211.
  • Fixes a hack that was used to get a hold of the panel element using querySelector. Now it properly uses a ViewChild query, however this meant some tests had to be updated.

Relates to #3211.
Fixes #6690.

@crisbeto crisbeto added Accessibility This issue is related to accessibility (a11y) pr: needs review labels Sep 5, 2017
@crisbeto crisbeto requested a review from kara as a code owner September 5, 2017 21:49
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Sep 5, 2017
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

Overall looks good; @kara should do a quick pass
(I'll get her to look at it tomorrow)

trigger.click();
fixture.detectChanges();
tick(200);
Copy link
Member

Choose a reason for hiding this comment

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

Make constants for 200 and 500 so that the different have some semantic meaning tied to it?

@crisbeto crisbeto added the P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful label Sep 14, 2017
Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM. Needs rebase now, though.

@kara kara assigned crisbeto and unassigned jelbourn and kara Sep 19, 2017
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Sep 19, 2017
@mmalerba mmalerba added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Sep 22, 2017
@mmalerba
Copy link
Contributor

please rebase

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Sep 23, 2017
@crisbeto
Copy link
Member Author

Ready to go @mmalerba.

@andrewseguin
Copy link
Contributor

Needs rebase

@andrewseguin andrewseguin added pr: needs rebase and removed action: merge The PR is ready for merge by the caretaker labels Sep 29, 2017
* Refactors the select to use `aria-activedescendant` to announce the highlighted item to screen readers. Previously we would this through focus, however using focus prevents us from being able to do things like angular#3211.
* Fixes a hack that was used to get a hold of the panel element using `querySelector`. Now it properly uses a `ViewChild` query, however this meant some tests had to be updated.

Relates to angular#3211.
Fixes angular#6690.
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed pr: needs rebase labels Sep 30, 2017
@kara kara merged commit b5ada20 into angular:master Oct 3, 2017
@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 Sep 7, 2019
essjay05 added a commit to essjay05/angular-components that referenced this pull request Aug 27, 2024
…iveDescendant

Updates previous fix to account for previous fix angular#6856 which refactored
focus on listbox to use aria-activedescendant instead to manage focus.

Fixes b/285945157
essjay05 added a commit to essjay05/angular-components that referenced this pull request Aug 28, 2024
…iveDescendant

Updates previous fix to account for previous fix angular#6856 which refactored
focus on listbox to use aria-activedescendant instead to manage focus.

Fixes b/285945157
essjay05 added a commit to essjay05/angular-components that referenced this pull request Aug 29, 2024
…iveDescendant

Updates previous fix to account for previous fix angular#6856 which refactored
focus on listbox to use aria-activedescendant instead to manage focus.

Fixes b/285945157
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Focus is lost when opening md-select options list
6 participants