Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

fix(checkbox): handle links in transcluded label in an a11y-friendly way #11154

Merged
merged 1 commit into from
Jun 30, 2020

Conversation

Splaktar
Copy link
Contributor

@Splaktar Splaktar commented Mar 8, 2018

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

JAWS and Voiceover can't get to links in md-checkbox labels.

Issue Number:
Fixes #11134

What is the new behavior?

  • JAWS and Voiceover should properly handle links in md-checkbox labels.
  • Wrapping the checkbox in md-input-container is required for using links in checkbox labels due to layout considerations.
  • Add new demos for different types of a11y checkbox labels.
  • don't toggle the checkbox on link actions
  • don't output aria warnings when using aria-labelledby
  • require md-input-container when using links in checkbox labels
  • update license copyright year

Does this PR introduce a breaking change?

[x] Yes
[ ] No

Other information

  • Need to add unit tests.
  • Need to determine if additional docs changes are needed

Screen Shot 2020-06-29 at 20 23 15

@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Mar 8, 2018
@Splaktar Splaktar self-assigned this Mar 8, 2018
@Splaktar Splaktar added needs: unit tests This PR needs unit tests to cover the changes being proposed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Mar 8, 2018
@Splaktar Splaktar added this to the 1.1.8 milestone Mar 8, 2018
@Splaktar Splaktar added a11y This issue is related to accessibility P3: important Important issues that really should be fixed when possible. g3: reported The issue was reported by an internal or external product team. labels Mar 8, 2018
@Splaktar Splaktar requested a review from jelbourn March 8, 2018 22:03
@Splaktar Splaktar force-pushed the checkboxA11yLinks branch from 9c8764f to 79f3d96 Compare March 12, 2018 20:10
@Splaktar Splaktar changed the title WIP: fix(checkbox): handle links in transcluded label in an a11y-friendly way fix(checkbox): handle links in transcluded label in an a11y-friendly way Mar 12, 2018
@Splaktar Splaktar force-pushed the checkboxA11yLinks branch 2 times, most recently from 212d940 to 9882de3 Compare March 12, 2018 21:59
@Splaktar Splaktar removed needs: unit tests This PR needs unit tests to cover the changes being proposed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Mar 12, 2018
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.

LGTM

@jelbourn jelbourn added pr: merge ready This PR is ready for a caretaker to review pr: lgtm This PR has been approved by the reviewer labels Mar 12, 2018
@mmalerba
Copy link
Contributor

There are several broken screenshot tests involving checkboxes that contain links

@Splaktar Splaktar added needs: team discussion This issue requires a decision from the team before moving forward. Blocked Progress on this issue is blocked. Primarily used for PRs that are blocked by presubmit feedback. labels Mar 15, 2018
@Splaktar Splaktar modified the milestones: 1.1.8, 1.1.9 Mar 17, 2018
@mmalerba mmalerba removed their assignment Mar 20, 2018
@Splaktar Splaktar removed pr: merge ready This PR is ready for a caretaker to review Blocked Progress on this issue is blocked. Primarily used for PRs that are blocked by presubmit feedback. labels Mar 29, 2018
@Splaktar Splaktar added the pr: merge ready This PR is ready for a caretaker to review label Mar 29, 2018
@Splaktar Splaktar modified the milestones: 1.1.9, 1.2.0 Mar 29, 2018
@Splaktar
Copy link
Contributor Author

Splaktar commented Mar 29, 2018

I am going to push this to 1.2.0 for now and investigate the autocomplete a11y issues. They are also likely to require breaking changes to fix. The combination of these breaking changes along with possible breaking changes for chips and select a11y and other breaking changes related to Material Design Spec alignment should make a good case for putting out a 1.2.0 release.

  • This commit message needs to be updated with notes on the breaking change

@Splaktar Splaktar added - Breaking Change in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs and removed pr: merge ready This PR is ready for a caretaker to review labels Mar 29, 2018
@Splaktar Splaktar removed pr: presubmit-failures needs: team discussion This issue requires a decision from the team before moving forward. labels Jun 29, 2020
@Splaktar Splaktar force-pushed the checkboxA11yLinks branch from 9882de3 to a8b31bd Compare June 30, 2020 00:01
- JAWS and Voiceover should properly handle links in md-checkbox labels
- Wrapping the checkbox in a `md-input-container` is required
  - for using links in checkbox labels due to layout considerations
- Add new demos for different types of a11y checkbox labels
- don't toggle the checkbox on link actions
- don't output aria warnings when using `aria-labelledby`
- require `md-input-container` when using links in checkbox labels

Fixes #11134.

BREAKING CHANGE: If you've created a custom solution to style links within `md-checkbox` labels, then you may need to remove or change that code now. This is because we automatically detect `<a>` tags in these labels and re-render them in an accessible way.
@Splaktar Splaktar force-pushed the checkboxA11yLinks branch from a8b31bd to 16fdc61 Compare June 30, 2020 00:28
@Splaktar Splaktar added pr: merge ready This PR is ready for a caretaker to review and removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Jun 30, 2020
@Splaktar Splaktar merged commit 4d36fd2 into master Jun 30, 2020
@Splaktar Splaktar deleted the checkboxA11yLinks branch June 30, 2020 00:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
- Breaking Change a11y This issue is related to accessibility cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ g3: reported The issue was reported by an internal or external product team. P3: important Important issues that really should be fixed when possible. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

checkbox: links in text are not rendered in a way that makes JAWS happy
4 participants