-
Notifications
You must be signed in to change notification settings - Fork 2.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
General markup cleanup on buttons and icons #8746
General markup cleanup on buttons and icons #8746
Conversation
…ded aria-hidden attribute
@BatJan actually I think the |
@bjarnef I appreciate your concern 👍 Since AngularJS make us use loads of invalid stuff like ng-init, ng-hide, ng-*whatever, not to mention all the custom directives the markup we produce in the app is invalid per se in general. And since the It's also not adviced to use empty href's if you build a website with a frontend powered by AngularJS - From the AngularJS docs here you can also see that ng-href="" is the recommended way to do it (Without and empty href="") :-) |
IIRC Safari used to not like it when there's no href, i.e. you could not click the links, not sure if it's still the case |
Doh! It's embarrassing that I could forget this... Without the href on the link will act like a placeholder and therefore loose the baked in accessibility and visuals like cursor pointer (I even mentioned that in my very own Skrift post 😬) - will revert this later. #h5is 🤪 |
Also you could have styling target on |
@nul800sebastiaan The places where I removed |
Thanks for the feedback all! This cleanup now looks good to me! 👍 |
Prerequisites
Description
Curious to see how many places that are still left to convert
<a>
containing emptyhref=""
attributes to<button>
elements I did a search forhref=""
and noticed that many<button>
elements had some leftover empty (and for buttons) invalidhref
attributes so I just cleaned that up converting them all totype="button"
instead.I also added
aria-hidden="true"
wherever the buttons wrapped an icon 👼There was some occurences where an empty
href
was supplied on links that containedng-href
already so I removed the attribute from there too.In the "umb-notification" I also removed the
aria-hidden="true"
attribute from the<i>
since the parent element is already hidden for screen readers using that same attribute anyway.Furthermore I have cleaned up some documentation markup as well so they showcase the use of
<button>
instead of<a href="">
.All minor stuff really but stuff that is nice to have cleaned up 💯