Skip to content

fix(material-experimental/mdc-checkbox): remove extra a11y tree node … …for the <label/> #24907

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

Merged
merged 1 commit into from
May 23, 2022

Conversation

zarend
Copy link
Contributor

@zarend zarend commented May 11, 2022

In the mdc checkbox component, removes the click handler on
and handles stoping propgation of clicks on the label in the label's
parent. This removes the extra a11y tree node on the label and fixes
TalkBack having an extra navigation stop (#14385).

A11y tree before this commit. It has an un-necessary node, which
corresponds to the <label> element.

- Generic
 - Checkbox, "Field A"
 - Textlabel, "Field A"

A11y tree with this commit applied

- Generic
 - Checkbox, "Field A"

fixes #14385

@zarend zarend added Accessibility This issue is related to accessibility (a11y) target: patch This PR is targeted for the next patch release area: material/checkbox labels May 11, 2022
@zarend zarend force-pushed the checkbox-label-a11y-tree-2 branch from 2f60f2b to 40b345d Compare May 12, 2022 00:06
@zarend zarend changed the title refactor(material-experimental/checkbox): change test for double-clic… fix(material-experimental/mdc-checkbox): remove extra a11y tree node … …for the <label/> May 12, 2022
@zarend zarend force-pushed the checkbox-label-a11y-tree-2 branch 2 times, most recently from 317cc09 to 5401dd8 Compare May 13, 2022 00:07
@zarend zarend added the dev-app preview When applied, previews of the dev-app are deployed to Firebase label May 13, 2022
@zarend zarend requested a review from crisbeto May 13, 2022 00:08
@zarend zarend marked this pull request as ready for review May 13, 2022 00:08
@zarend zarend requested a review from mmalerba as a code owner May 13, 2022 00:08
@github-actions
Copy link

github-actions bot commented May 13, 2022

@zarend zarend force-pushed the checkbox-label-a11y-tree-2 branch 2 times, most recently from 66b4fe6 to cfe526c Compare May 13, 2022 19:37
@zarend zarend requested a review from crisbeto May 13, 2022 19:37
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

The change LGTM, but the lint check is failing and my approval will be invalidated when it's fixed.

@zarend zarend force-pushed the checkbox-label-a11y-tree-2 branch from cfe526c to c67de2a Compare May 16, 2022 16:17
crisbeto
crisbeto previously approved these changes May 16, 2022
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@devversion devversion removed their request for review May 17, 2022 07:57
@zarend zarend force-pushed the checkbox-label-a11y-tree-2 branch from c67de2a to 84aae0c Compare May 17, 2022 16:28
mmalerba
mmalerba previously approved these changes May 17, 2022
@zarend zarend force-pushed the checkbox-label-a11y-tree-2 branch from 84aae0c to 8413a3a Compare May 21, 2022 23:14
…for the <label/>

In the mdc checkbox component, removes the click handler on <label/>
and handles stoping propgation of clicks on the label in the label's
parent. This removes the extra a11y tree node on the label and fixes
TalkBack having an extra navigation stop (angular#14385).

A11y tree before this commit. It has an un-necessary node, which
coresponds to the `<label>` element.
```
- Generic
 - Checkbox, "Field A"
 - Textlabel, "Field A"
```

A11y tree with this commit applied
```
- Generic
 - Checkbox, "Field A"
```

fixes angular#14385
@zarend zarend force-pushed the checkbox-label-a11y-tree-2 branch from 8413a3a to 59d0c3c Compare May 21, 2022 23:25
@zarend zarend requested a review from crisbeto May 21, 2022 23:37
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM

@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label May 22, 2022
@zarend zarend merged commit c543db5 into angular:main May 23, 2022
@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 Jun 23, 2022
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 area: material/checkbox dev-app preview When applied, previews of the dev-app are deployed to Firebase target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Two navigation stops for mdc radio buttons with TalkBack
3 participants