Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Disabled browser default outline for listview buttons on focus #4303

Closed
wants to merge 1 commit into from
Closed

Conversation

jaspermdegroot
Copy link
Contributor

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.

@toddparker
Copy link
Contributor

Good catch.

@scottjehl
Copy link

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 May 15, 2012
@jaspermdegroot
Copy link
Contributor Author

@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

@jaspermdegroot
Copy link
Contributor Author

@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.

@ghost ghost assigned scottjehl May 27, 2012
@jaspermdegroot
Copy link
Contributor Author

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

@toddparker
Copy link
Contributor

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

@jaspermdegroot
Copy link
Contributor Author

@toddparker
Copy link
Contributor

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants