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

fix(slide-toggle): consistent naming of aria attributes #2688

Merged
merged 2 commits into from
Jan 19, 2017

Conversation

devversion
Copy link
Member

  • Ensures that the slide-toggle uses consistent attribute naming.

Consistent with the native inputs and other Material components.

* Ensures that the slide-toggle uses consistent attribute naming.
Consistent with the native inputs and other Material components.
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jan 17, 2017
@@ -83,13 +83,13 @@ export class MdSlideToggle implements AfterContentInit, ControlValueAccessor {
@Input() id: string = this._uniqueId;

/** Used to specify the tabIndex value for the underlying input element. */
@Input() tabIndex: number = 0;
@Input() tabindex: number = 0;
Copy link
Member

Choose a reason for hiding this comment

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

It should be tabIndex, as that's the name of the property on native elements.
(e.g., with an input you'd do <input [tabIndex]="...">)

Copy link
Member Author

@devversion devversion Jan 17, 2017

Choose a reason for hiding this comment

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

But if we change the @Input() to tabIndex then using tabindex as a normal HTML attribute won't work anymore?

Thought about doing @Input('tabindex') tabIndex but that doesn't cover both cases.

Also we currently have tabindex for the deprecated input right now.

Copy link
Member Author

Choose a reason for hiding this comment

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

@jelbourn Changed it back to tabIndex, because I think that the consistency with the HTMLElement property is more weighted than the tabindex attribute.

Didn't change it for the deprecated input component, because making some breaking changes on something that's deprecated feels wrong.

@jelbourn
Copy link
Member

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Jan 17, 2017
@mmalerba mmalerba merged commit 10bd6da into angular:master Jan 19, 2017
@devversion devversion deleted the fix/slide-toggle-naming branch January 19, 2017 07:42
kara pushed a commit to kara/material2 that referenced this pull request Jan 20, 2017
* fix(slide-toggle): consistent naming of aria attributes

* Ensures that the slide-toggle uses consistent attribute naming.
Consistent with the native inputs and other Material components.

* Change back to tabIndex
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants