Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: add outline when tab and sidenav anchor elements are focused #185

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mishamilovidov
Copy link

@mishamilovidov mishamilovidov commented Sep 23, 2021

Description

  • Set outline: auto; in the Tabs and SideNav components' CSS to show focus outline

Related Issue

Motivation and Context

The "Header" and "SideNav" components render links with their CSS outline property set to none when the element is in a focused state (which is the default in @spectrum/css AFAICT based on what's here and here). In practice this makes it so that when a user is using keyboard navigation, the UI doesn't reflect when the element is focused. This change makes the focus state of elements in the Header and SideNav visible by default.

How Has This Been Tested?

Since these are style changes, I used storybook for testing to verify there's an outline when the elements are "focused".

SideNav:

Screen Shot 2021-09-27 at 16 18 12

Header - title:

Screen Shot 2021-09-27 at 16 32 13

Header - siteTitle:

Screen Shot 2021-09-27 at 16 30 38

Header - Tabs item:

Screen Shot 2021-09-27 at 16 27 25

Screenshots:

Before

before

After

after

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@mishamilovidov mishamilovidov marked this pull request as ready for review September 28, 2021 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

items in tabs and sidenav components not outlined when focused
1 participant