Answer the question
In order to leave comments, you need to log in
What to do with button outline without border?
A few points:
outline
a, button
Tab
outline
, then everything is fine with the tag a
- by taboo it is highlighted with a stroke, by click - no. button
there are already problems with - when styling a button, button
we often remove y border
and a problem arises: when it button
doesn’t have border
, when you click on it, it appears outline
, and after clicking on it, it outline
doesn’t disappear! outline
element behave button
the same as the tag a
) outline
onbutton
, it will not be highlighted when switching by taboo, if I leave it - there will be a problem when clicking, and it doesn’t look very nice on round buttons: square outline
on a round button... (exactly like this in the example)Answer the question
In order to leave comments, you need to log in
In order:
1) Not quite right. It is not recommended to leave the default outline. It is recommended to change the style of an element when it is in focus, so that it is more convenient for the user to navigate and navigate which element is currently active. And leave the default outline if you don't want to bother with it.
2) There are different options. Here is a fresh one: https://matthiasott.com/notes/focus-visible-is-here - here you will find a modern solution and how to extend it to older browsers.
All problems are fictional.
In terms of accessibility, you can do whatever you want with the outline, but you must highlight the :focus and :active states in any way.
Hence the solution to the second problem with buttons - do not forget to style them for these states.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question