Bootstrap: <a>-primary button color is black without "href" attribute

Created on 10 Dec 2017  路  2Comments  路  Source: twbs/bootstrap

I'm developing angular applications, therefore I'm not using href as an attribute. This causes that the color for primary buttons is black instead of white! Reproduce it like this: <a class="btn btn-primary">Click me</a>

image

image

Most helpful comment

An <a> tag without an href is not presented to screen reader users as a link (or button for that matter). <a> tags without an href are also not in the document tab sequence by default, making them inaccessible to keyboard only users.

I would recommend setting href="#" or switching to a more semantic markup such as <button> which will make your site usable for users of assistive technologies

All 2 comments

An <a> tag without an href is not presented to screen reader users as a link (or button for that matter). <a> tags without an href are also not in the document tab sequence by default, making them inaccessible to keyboard only users.

I would recommend setting href="#" or switching to a more semantic markup such as <button> which will make your site usable for users of assistive technologies

thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fohlsom picture fohlsom  路  3Comments

matsava picture matsava  路  3Comments

alvarotrigo picture alvarotrigo  路  3Comments

devdelimited picture devdelimited  路  3Comments

ghost picture ghost  路  3Comments