Skip to content

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

Closed

Description

@MartinMa

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?

Activity

  1. added
    AccessibilityThis issue is related to accessibility (a11y)
    help wantedLabel noting an issue which the team is looking for contribution from the community to fix
    on May 31, 2016
  2. added this to the alpha.6 milestone on May 31, 2016
  3. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on May 31, 2016
  4. jelbourn commented on May 31, 2016

    @jelbourn
    Contributor

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

  5. sendilkumarn commented on Jun 1, 2016

    @sendilkumarn
    Contributor

    😢 i finished it just now, without seeing this 👍

  6. angular-automatic-lock-bot commented on Sep 4, 2019

    @angular-automatic-lock-bot

    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.

  7. locked and limited conversation to collaborators on Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AccessibilityThis issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenthelp wantedLabel noting an issue which the team is looking for contribution from the community to fix

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions