Make outline consistent for all focusable elements in the APP across platforms.
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:
- Open any convo on E.cash on the web.
- Try to use the tab for navigation.
- See multiple elements get focus with an outline that is different across the platforms.
Expected Result:
- same Color of outline for each platform.
Actual Result:
Describe what actually happened
- Web(chrome) shows black solid.
- Web Firebox shows dotted line.
- Desktop has a yellow border.
- 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

Expensify/Expensify Issue URL:
cc: @shawnborton
Triggered auto assignment to @stephanieelliott (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
Was able to demo this by following the reproduction steps 👍
Triggered auto assignment to @ctkochan22 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Triggered auto assignment to @jboniface (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
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.
Triggered auto assignment to @tgolen (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@tgolen please check Rajat's proposal when you get a chance!
I'm OK with the CSS route. Is that going to make sure that android and ios are consistent too?
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.
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.
So maybe using addOutlineWidth across all platforms would be the most consistent approach then.
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.
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;
}
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.
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?
I mean,
*::focus{
outline: 0px;
}
can be used to hide, but only if we want to hide outlines.
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?
Late to the convo here, but hiding the outline styles might be a bad idea for accessibility right?
Yes, hiding outlines is bad.
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.