Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Disabled browser default outline for listview buttons on focus #4303

wants to merge 1 commit into from

3 participants


Issue: Listview and custom selectmenu items still have the default browser outline on focus (together with box-shadow of ui-focus class) while outline is set to 0 for all other buttons. See #2214

Fix: Added .ui-link-inherit:focus selector to the .ui-btn:focus { outline: 0; } rule.


Good catch.


Hmm, yes good catch but I don't think that's the only place ui-link-inherit is used. It's used for child links within other generic themed containers as well (ui-bar-a, etc). I'd suggest moving this rule to the listview and selectmenu plugins' CSS files and scoping to those plugins specifically so it doesn't affect accessibility for other links in the page. Make sense? If not, I can reopen the pull.

@scottjehl scottjehl closed this

@scottjehl hi Scott,

Thanks for reviewing this PR!

I just checked the JS again and it seems to me that the framework only add the ui-link-inherit class in the listview widget. Also, it always concerns a link wrapped in .ui-btn (which gets the ui-focus box-shadow styling on focus).
Can you give me an example when a child link in a bar has ui-link-inherit?

If we move it to the specific CSS files, we should move the rule for .ui-btn:focus to the button.css as well. Removing it from the theme to structure CSS makes it harder for people to adjust the focus style to their own preferences.

What do you think about making the selector more specific? .ui-focus .ui-link-inherit:focus


@scottjehl - If you agree it's safe to use .ui-focus .ui-link-inherit:focus I will create a new PR for that. Seems easier that reopening this one.

@scottjehl scottjehl was assigned

@scottjehl @toddparker - Do you agree with this change: .ui-btn:focus, .ui-focus .ui-link-inherit:focus { outline: 0; } ?


@uGoMobi - I'd like to see a demo page to give this idea some testing.


I just tested this in a few desktop browsers, iOS and Android and it looks great so this is ready to land. Excellent work, as always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  css/themes/default/
2  css/themes/default/
@@ -1132,7 +1132,7 @@ a.ui-link-inherit {
/* Focus state - set here for specificity (note: these classes are added by JavaScript)
-.ui-btn:focus {
+.ui-btn:focus, .ui-link-inherit:focus {
outline: 0;
Something went wrong with that request. Please try again.