J4 Issue ?
avatar brianteeman
brianteeman
15 Aug 2019

For some reason we are setting the focus outline to none (not recommended)

 .js-focus-visible :focus:not(.focus-visible) {
    outline: none
}

And then manually putting it back to each element


.custom-select:focus {
    border-color: #368ace;
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(26,70,107,.25)
}

.custom-select:focus::-ms-value {
    color: #495057;
    background-color: #fff
}

But the focus style is not being set for everything - eg switcher

You can see this by going to any option page and try to tab between the fields. When you are in a list you get the outline. When you are focussed on a switcher you dont

avatar brianteeman brianteeman - open - 15 Aug 2019
avatar joomla-cms-bot joomla-cms-bot - change - 15 Aug 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Aug 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 15 Aug 2019
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 16 Aug 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 16 Aug 2019
avatar brianteeman
brianteeman - comment - 16 Aug 2019

There is also no focus outline on the cog icon here
image

avatar brianteeman
brianteeman - comment - 17 Aug 2019

There are also inputs that have custom focus outline and other inputs that have default focus outline

image

image

avatar brianteeman
brianteeman - comment - 17 Aug 2019

we need to

  1. revert the focus-visible code and polyfill - 1 year after that code was committed there is still no browser that supports focus-visible
  2. revert all the element specific outlines
  3. remove the outline: none
  4. make sure that the default outline: is styled how we want.

Right now its a mess of inconsistencies and accessibility failures

avatar wilsonge
wilsonge - comment - 22 Aug 2019

@dgrammatiko - you mentioned about focus polyfill on our skype call. Can you just drop your comments in here on it

avatar dgrammatiko
dgrammatiko - comment - 22 Aug 2019

@wilsonge sure. First of all, we need to understand what this :focus-visible is. For this, I've created a pen: https://codepen.io/dgrammatiko/pen/rNBjLLd

So if you tab to the first button (default browser CSS) and press enter you'll see that the focus ring is still there
Screenshot 2019-08-22 at 18 54 57

If you repeat the process and tab to the green (bootstrap CSS) button you won't get a ring on the button:
Screenshot 2019-08-22 at 18 55 23

So bootstrap is breaking an accessibility rule here and buttons are not the only elements that BS is breaking that rule.

So focus-visible is a pseudo-class that allows better control of the ring, eg we don't need a ring for the mouse but we need one on the keyboard. Obviously patching Bootstrap all over the place to get it right might be something that the project won't like to do. So, I guess, a small hiccup in the accessibility by removing this polyfill and using the code (as is) form Bootstrap is also ok.

avatar dgrammatiko
dgrammatiko - comment - 22 Aug 2019

revert the focus-visible code and polyfill - 1 year after that code was committed there is still no browser that supports focus-visible

Well that's not accurate: https://caniuse.com/#search=focus-visible

avatar brianteeman
brianteeman - comment - 22 Aug 2019

One browser supporting it with a vendor prefix is hardly support

This is nothng to do with bootstrap but sadfly once again you let your prejudice get the better.

Clearly you have no wish to do anything constructive.

avatar dgrammatiko
dgrammatiko - comment - 22 Aug 2019

This is nothng to do with bootstrap but sadfly once again you let your prejudice get the better.

Sure, that's because I'm an idiot and I can't understand when a rule is broken...

avatar brianteeman
brianteeman - comment - 22 Aug 2019

Show me an example on https://getbootstrap.com where there are buttons with no outlines on keyboard focus - I checked every page of the site and every example

avatar dgrammatiko
dgrammatiko - comment - 22 Aug 2019

@brianteeman dude can you please take it easy?
I already stated that this polyfill can be removed but I went ahead and created a pen to demonstrate one of the cases this polyfill was covering (try it with safari for better understanding)...

avatar brianteeman
brianteeman - comment - 22 Aug 2019

I am referring to your comments about bs

I am happy for the polyfill to stay but it has "broken" so many things it is easier to remove it and the associated css changes.

avatar brianteeman
brianteeman - comment - 19 Sep 2019

@ciar4n could you take a look at this please. The closer I look at the problem with the missing outline on the cog the more it looks like a css specificity issue. But I suck at css

avatar ciar4n
ciar4n - comment - 20 Sep 2019

I guess the issue here is the focusable elements of the switcher (inputs) are always hidden. Basically, the default browser/bootstrap method of focus will not work here. Focus CSS specific to the switcher can be added to get around this.

Is there any other fields missing a focus?

avatar ciar4n
ciar4n - comment - 20 Sep 2019

Also, what is the preferred focus styling for J4. There appear to be some variations.

avatar brianteeman
brianteeman - comment - 20 Sep 2019

I never said anything about the switcher

avatar ciar4n
ciar4n - comment - 20 Sep 2019

@brianteeman

But the focus style is not being set for everything - eg switcher

avatar ciar4n
ciar4n - comment - 22 Sep 2019

#26377 .. PR adding focus styling for the switcher which is mentioned in the description of this issue.

avatar brianteeman
brianteeman - comment - 15 Jan 2020

fixed the issue with the cog

closing for now

avatar Quy Quy - change - 15 Jan 2020
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2020-01-15 11:02:35
Closed_By Quy
avatar Quy Quy - close - 15 Jan 2020

Add a Comment

Login with GitHub to post a comment