-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Conversation
devversion
commented
Jan 17, 2017
- Ensures that the slide-toggle uses consistent attribute naming.
* Ensures that the slide-toggle uses consistent attribute naming. Consistent with the native inputs and other Material components.
@@ -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; |
There was a problem hiding this comment.
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]="...">
)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
LGTM |
* 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
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |