CSS 'outline' is missing when WebChat buttons, text fields and links receive focus [keyboard accessibility]
See original GitHub issueHi,
- Relates to :~ #3655;
Screenshots
Version
- WebChat.js version :~ 4.10.1;
- All browsers, all browser-versions, all platforms;
Describe the bug
When I as a visual user navigate a WebChat-based Chat-bot using the keyboard, I can NOT tell which button or text-field has received focus, as the CSS outline
has been set to 0
or none
.
Steps to reproduce
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Expected behavior
I expect to see an outline (defaults to blue in some browsers) around the focussed element — button, text field, link, so I know where I am.
Potential fix
Do we want to give the option for the outline
to be set to none
, for backwards compatibility? I suggest, yes.
I propose a new property in defaultStyleOptions.js
named for example, outlineOn
, which should default to true
. It would be used in the various components, for example:
- https://github.com/microsoft/BotFramework-WebChat/blob/v4.11.0/packages/component/src/Styles/StyleSet/SendBoxButton.js#L14;
- …
- https://github.com/microsoft/BotFramework-WebChat/blob/v4.11.0/packages/component/src/Styles/StyleSet/SendBoxTextBox.js#L21;
- …?
For example:
return {
'&.webchat__icon-button': {
backgroundColor: 'Transparent',
border: 0,
height: '100%',
outline: outlineOn ? 'initial' : 'none', // <<-- Proposed fix!
padding: 0,
Please feedback on this proposal.
Yours,
Nick
[Bug]
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (11 by maintainers)
Top Results From Across the Web
Default buttons don't show outline styles on click
I don't think there is a way to differentiate, focus on button by keyboard input or mouse click, both trigger the focus event...
Read more >focus-visible - CSS: Cascading Style Sheets - MDN Web Docs
This selector is useful to provide a different focus indicator based on the user's input modality (mouse vs. keyboard).
Read more >Focus Visible - Understanding Success Criterion 2.4.7 - W3C
One common way is a caret within the text field to indicate that the text field has the keyboard focus. Another is a...
Read more >Buttons - Lightning Design System
Base LinkNeutral LinkBrand LinkOutline Brand LinkDestructive LinkText ... The stateful button should have aria-pressed="true" or "false" and the accessible ...
Read more >Accessibility Developers' Guide - Deque University
WCAG Element(s) Impact Testing
WCAG 1.1.1 (A) Images Critical Auto & Manual
WCAG 1.1.1 (A) Images Serious Auto & Manual
WCAG 1.1.1 (A) Images Serious Auto...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Amit8527510735,
Thank you for your response regarding the subject matter expert’s (SME’s) advise (I mis-read it a few days ago!)
@corinagum … If I can get PR #3669 sorted quickly, I’m happy to contribute a pull request for this.
Thanks again,
Nick
I’m adding this to our front-burner to hopefully be addressed in our next milestone.