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

radio: adding actionName attribute as label fallback (aria-label) #586

Closed
MartinMa opened this issue May 31, 2016 · 3 comments
Closed

radio: adding actionName attribute as label fallback (aria-label) #586

MartinMa opened this issue May 31, 2016 · 3 comments
Labels
Accessibility This issue is related to accessibility (a11y) help wanted The team would appreciate a PR from the community to address this issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone

Comments

@MartinMa
Copy link
Contributor

Bug, feature request, or proposal:

feature request

What is the expected behavior?

If the radio button has an empty label, it should be possible (for accessibility reasons) to provide a value for the aria-label attribute.

What is the current behavior?

When the radio button is unlabeled, there is no way to set an aria-label on the input element as a fallback.

What are the steps to reproduce?

not applicable

What is the use-case or motivation for changing an existing behavior?

Think of a table with radio buttons in each row. The de facto labels are located in the <th>-part of the table.

This could be a solution:

<md-radio-button name="group1" actionName="Option 1"></md-radio-button>

It results in:

<md-radio-button _ngcontent-jha-3="" actionname="Option 1" name="group1" id="md-radio-0">
  <label class="md-radio-label" for="md-radio-0-input">
    <div class="md-radio-container">
      <div class="md-radio-outer-circle"></div>
      <div class="md-radio-inner-circle"></div>
      <div class="md-ink-ripple"></div>
    </div>
    <input class="md-radio-input" type="radio" id="md-radio-0-input" name="group1" aria-label="Option 1">
    <div class="md-radio-label-content">
    </div>
  </label>
</md-radio-button>

Which versions of Angular, Material, OS, browsers are affected?

Material 2.0.0-alpha.5

Is there anything else we should know?

@jelbourn jelbourn added Accessibility This issue is related to accessibility (a11y) help wanted The team would appreciate a PR from the community to address this issue labels May 31, 2016
@jelbourn jelbourn added this to the alpha.6 milestone May 31, 2016
@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label May 31, 2016
@jelbourn
Copy link
Member

We should just support setting aria-label directly on the md-radio-button

@sendilkumarn
Copy link
Contributor

😢 i finished it just now, without seeing this 👍

@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 4, 2019
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) help wanted The team would appreciate a PR from the community to address this issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

3 participants