Skip to content

Global and component focus state color #6458

@geospatialem

Description

@geospatialem

Description

Our focus outline is set to "2px solid --calcite-ui-brand" by default, but we should ensure the focus is exposed across all components and devs can modify to fit their need.

We will also need to document to provide context and process to designers and developers to support WCAG 2.2's upcoming level A requirement with 2.4.7: Focus Visible (Level A).

cc @macandcheese

Acceptance Criteria

Exposed and documented CSS variable which sets the focus color default to --calcite-ui-brand, which can be modified.

Devs should also be able to edit the CSS variable to a color of their choice, for a specific component, or across all components.

Relevant Info

We should also complete an audit on our hitbox focus across components to improve focus throughout our components - refer to #4633

Which Component

All components

Example Use Case

Devs who currently don't like the styling can turn off focus by setting the outline to "0".

We should provide a way to support devs who wish to change the focus color, or as a last resort set the color as "transparent" so the focus state remains to ensure we're meeting and supporting WCAG 2.2 out of the box, and documenting how to change depending on branding needs.

Esri team

Calcite (dev)

monday.com sync: #9366659587

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - newNew issues that need assignment.ArcGIS Living AtlasIssues logged by ArcGIS Living Atlas team members.Calcite (dev)Issues logged by Calcite developers.a11yIssues related to Accessibility fixes or improvements.designIssues that need design consultation prior to, or during, development.design-tokensIssues requiring design tokens.enhancementIssues tied to a new feature or request.estimate - 5A few days of work, definitely requires updates to tests.monday.com syncMonday.com syncneeds milestonePlanning workflow - pending milestone assignment, has priority and/or estimate.p - lowIssue is non core or affecting less that 10% of people using the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions