App icon indicating copy to clipboard operation
App copied to clipboard

Make outline consistent for all focusable elements in the APP across platforms.

Open parasharrajat opened this issue 5 years ago • 34 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open any convo on E.cash on the web.
  2. Try to use the tab for navigation.
  3. See multiple elements get focus with an outline that is different across the platforms.

Expected Result:

  1. same Color of outline for each platform.

Actual Result:

Describe what actually happened

  1. Web(chrome) shows black solid.
  2. Web Firebox shows dotted line.
  3. Desktop has a yellow border.
  4. ETC...

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Just a UI thing.

Platform:

Where is this issue occurring?

Web :heavy_check_mark: iOS Android Desktop App :heavy_check_mark: Mobile Web

Version Number: Latest Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation Screenshot 2021-07-10 01:11:40 Screenshot 2021-07-10 01:11:18 Screenshot 2021-07-10 01:17:52

Expensify/Expensify Issue URL:

View all open jobs on Upwork

view this job on Upwork

cc: @shawnborton

parasharrajat avatar Jul 09 '21 19:07 parasharrajat

Triggered auto assignment to @stephanieelliott (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

MelvinBot avatar Jul 09 '21 19:07 MelvinBot

Was able to demo this by following the reproduction steps 👍

stephanieelliott avatar Jul 14 '21 18:07 stephanieelliott

Triggered auto assignment to @ctkochan22 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Jul 14 '21 18:07 MelvinBot

Triggered auto assignment to @jboniface (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Jul 16 '21 22:07 MelvinBot

To fix this easiest way is to override the global Outline style so that it reflects on each platform. Add Global CSS style to index.html

*::focus{
	outline: 1px solid COLOR;
}

or we can use box-shadow as bootstrap uses for the blurred outline.

If don't want to use the global style which I am aware of, the best option to do is to disable the default outline and only apply to the specific elements with

addOutlineWidth()

I would say its better to handle the web-specific global styles as a global stylesheet. We can call this browser-reset. They are used to reset the browser-applied styles which we don't want.

parasharrajat avatar Jul 18 '21 18:07 parasharrajat

Triggered auto assignment to @tgolen (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Jul 19 '21 21:07 MelvinBot

@tgolen please check Rajat's proposal when you get a chance!

jboniface avatar Jul 19 '21 21:07 jboniface

I'm OK with the CSS route. Is that going to make sure that android and ios are consistent too?

tgolen avatar Jul 20 '21 20:07 tgolen

Yeah. I think Android or IOS does not have an outline for focused elements. And for those elements which we want to show outline, are already configured to show correct one using addOutlineWidth. But I will double-check this.

parasharrajat avatar Jul 20 '21 20:07 parasharrajat

Hm, OK. That sounds like things would still not be consistent then across platforms, since ALL web elements would get the outline, but android/ios would have it only for specific elements with addOutlineWidth.

tgolen avatar Jul 20 '21 20:07 tgolen

So maybe using addOutlineWidth across all platforms would be the most consistent approach then.

tgolen avatar Jul 20 '21 20:07 tgolen

No so Global styles would be overwritten by addOutlineWidth. There are many elements on the Web that are not configured to show outline but the browser shows a default outline. So it's better to tackle them via Global style and native devices do not have default outlines so no elements show outline unless added.

Just like from reproducing Steps, Native does not have tab navigation.

since ALL web elements would get the outline

They already have but we are trying to set the correct color and style. We can also disable them but that is not accessible.

parasharrajat avatar Jul 20 '21 20:07 parasharrajat

OK, but with your proposal above, it would ADD a default outline to everything in web. Shouldn't the global style be removing the outline from everything by default, and then addOutlineWidth would add it to the elements necessary? I guess I'm expecting the global style to be:

*::focus{
	outline: 0px;
}

tgolen avatar Jul 20 '21 21:07 tgolen

I am not sure if disabling the outline is a good idea. It's better to pull the design team for that. We just closed one of the issues https://github.com/Expensify/App/issues/3041 like that.

Yeah, this style will be used to hide them but if we want to hide.

parasharrajat avatar Jul 20 '21 21:07 parasharrajat

Yeah, this style will be used to hide them but if we want to hide.

Sorry, I'm not quite sure what you mean here. Can you please restate that?

tgolen avatar Jul 20 '21 21:07 tgolen

I mean,

*::focus{
	outline: 0px;
}

can be used to hide, but only if we want to hide outlines.

parasharrajat avatar Jul 20 '21 21:07 parasharrajat

Ah right, gotcha. So, I think if the problem is "focus styles aren't consistent across platforms", then on web, hiding all outlines by default would fix that problem. Right?

tgolen avatar Jul 20 '21 21:07 tgolen

Late to the convo here, but hiding the outline styles might be a bad idea for accessibility right?

shawnborton avatar Jul 20 '21 21:07 shawnborton

Yes, hiding outlines is bad.

parasharrajat avatar Jul 20 '21 21:07 parasharrajat

OK, yes, that probably is. But what I'm trying to say is that while the problem that this issue describes is solved by the proposal, it also opens up a brand new issue where focus styles are still inconsistent between platforms. Because in web, any focused element will have an outline now, whereas android/ios will only get outlines for ones that are configured to have outlines.

tgolen avatar Jul 20 '21 21:07 tgolen