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

Conversation

@Splaktar
Copy link
Contributor

PR Checklist

Please check that your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added or this is not a bug fix / enhancement
  • Docs have been added, updated, or were not required

PR Type

What kind of change does this PR introduce?

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

What is the current behavior?

  • Screen readers don't work properly (in different ways, see issues) with md-radion-group and md-radio-button.
  • The radio button demos are not accessible.
  • There is a lot of extra stuff in the radio button demos that makes them more complex than needed, including unused styles, extra elements and attributes, etc.

Issue Number:
Fixes #11973. Fixes #11923. Fixes #11974.

What is the new behavior?

Screen reader behavior is improved/fixed.

  • when no value selected, set aria-activedescendant to first button's id
  • properly define labels and aria-labelledby in demos
  • improve some JSDoc and types
  • rename some variables to make them more readable
  • remove unused parameters
  • improvements to multi-column demo
    • remove unneeded or unused styles and elements
    • use aria-describedby to make first column available to screen reader users

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

… on focus

- when no value selected, set `aria-activedescendant` to first button's `id`
- properly define labels and `aria-labelledby` in demos
- improve some JSDoc and types
- rename some variables to make them more readable
- remove unused parameters
- improvements to multi-column demo
  - remove unneeded or unused styles and elements
  - use `aria-describedby` to make first column available to screen reader users

Fixes #11973. Fixes #11923. Fixes #11974.
@googlebot googlebot added the cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ label Jul 30, 2020
@Splaktar Splaktar added this to the 1.2.0 milestone Jul 30, 2020
@Splaktar Splaktar self-assigned this Jul 30, 2020
@Splaktar Splaktar added a11y This issue is related to accessibility P2: required Issues that must be fixed. pr: merge ready This PR is ready for a caretaker to review type: bug labels Jul 30, 2020
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

LGTM

@Splaktar Splaktar removed the request for review from andrewseguin July 30, 2020 19:10
@Splaktar Splaktar added the pr: lgtm This PR has been approved by the reviewer label Jul 30, 2020
@Splaktar Splaktar merged commit 9159384 into master Jul 30, 2020
@Splaktar Splaktar deleted the radio-button-a11y branch July 30, 2020 19:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a11y This issue is related to accessibility cla: yes PR author has signed Google's CLA: https://opensource.google.com/docs/cla/ P2: required Issues that must be fixed. pr: lgtm This PR has been approved by the reviewer pr: merge ready This PR is ready for a caretaker to review type: bug

Projects

None yet

4 participants