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

feat(ngAria): add option to disable role=button #12234

Closed
wants to merge 1 commit into from

Conversation

marcysutton
Copy link
Contributor

I am separating a larger ngAria refactor into smaller pieces and getting them submitted! Starting with a config option for role="button", which is added by ngClick onto divs or custom elements like <radio-group>. If bindRoleForClick is set to false in the config, ngAria will not add the button role to custom elements using ng-click. I'm totally open to renaming the config variable.

Closes #11580

Note config options are app-wide–an awesome improvement would be to scope them by controllers or directives. Related to #11174.

Review on Reviewable

compileElement('<radio-group ng-click="something"></radio-group>');
expect(element.attr('role')).toBeUndefined();
});
});
Copy link
Member

Choose a reason for hiding this comment

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

Indentation :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It matches the rest of the file. I didn't want to introduce whitespace changes, especially to make the whole file consistent. But if it's important, I can....

Copy link
Member

Choose a reason for hiding this comment

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

Inside the function you are using 4 spaces (most of the time). It should be 2 spaces (according to Angular's "styleguide".
(I don't think it's a big deal, but I have a thing about whitespace inconsistency :P)

@gkalpak
Copy link
Member

gkalpak commented Jun 30, 2015

LGTM (other than the whitespace nitpick) as long as Travis is happy.

@marcysutton
Copy link
Contributor Author

@gkalpak I fixed the whitespace, looks like Travis stopped complaining about whatever it was failing on. It looked very unrelated to these changes when I dug into them.

@gkalpak gkalpak added this to the 1.4.2 milestone Jul 1, 2015
@marcysutton marcysutton deleted the ngaria-clickrole branch July 2, 2015 16:31
netman92 pushed a commit to netman92/angular.js that referenced this pull request Aug 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants