-
Notifications
You must be signed in to change notification settings - Fork 27.4k
ngAria should make ng-click as accessible for anchor tags as it does for DIV/LI #11053
Comments
@marcysutton can you take a look at this? Thanks! |
Just evaluating if it makes sense, that is ;) |
I actually don't think this is a good idea. Anchors shouldn't have An anchor should have an |
Agreed. Buttons should be I'm just saying it seems inconsistent to make ng-click trigger for |
I see your point. The purpose of |
Actually now I'm seeing the makings of accessibility problems, right in the Angular docs for
Not only has |
Just adding this here so I don't forget: if we do add support for anchors without |
hey guys--any update on this? semantically i agree buttons should be buttons but enabling ngAria for li and div elements kind of moots that argument. if you're leaning towards not supporting i'll just create a css reset for inline button "links." |
@marcysutton, wdyt should be done here ? Move it forward or close it as won't fix ? |
If someone wants to submit a PR, we'd be open to it. I'm not taking it on as I have other PRs to submit first, and this is a pretty low priority. |
OK, leaving it open then. Thx @marcysutton ! |
Could I get your feedback @marcfallows, @jorupp on #13996 |
Changes for #10388 got rid of the extra events for
BUTTON
andA
tags, but I think more could be done to make the accessibility more consistent. The browser already triggers the click event forA
tags onenter
if thehref
attribute is set, but never triggers the click event onspace
.I think ngAria should hook keypress and trigger ng-click bindings on
space
, and trigger onenter
if nohref
attribute is set.This would result in ng-click behaving the same on
BUTTON
(implemented by the browser),A
(browser + this change),DIV
, andLI
- triggering on click,enter
, orspace
.The text was updated successfully, but these errors were encountered: