question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS 'outline' is missing when WebChat buttons, text fields and links receive focus [keyboard accessibility]

See original GitHub issue

Hi,

Screenshots

Version

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

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. 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:

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:open
  • Created 3 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
nfreearcommented, Jan 29, 2021

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

0reactions
corinagumcommented, Jan 28, 2021

I’m adding this to our front-burner to hopefully be addressed in our next milestone.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found