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

Enhancement: Focus outline inset #3392

Closed
joeyHarig opened this issue Oct 29, 2021 · 8 comments
Closed

Enhancement: Focus outline inset #3392

joeyHarig opened this issue Oct 29, 2021 · 8 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. enhancement Issues tied to a new feature or request. research Issues that require more in-depth research or multiple team members to resolve or make decision.

Comments

@joeyHarig
Copy link
Contributor

Description

Allow specification of focus outline on components to be inset. Components like calcite-action and calcite-input utilize inset outlines when focused on while calcite-button and calcite-dropdown utilize an outset outline. When the surrounding elements prevent overflow, outset outlines can be covered hidden.

Acceptance Criteria

  • add prop to components with outset focus outlines to allow them to be inset

Which Component

  • calcite-button
  • calcite-stepper
  • calcite-tabs

possibly

  • calcite-switch

Example Use Case

Screen Shot 2021-10-29 at 3 52 02 PM

@joeyHarig joeyHarig added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Oct 29, 2021
@macandcheese
Copy link
Contributor

We will need to examine how to allow this while ensuring focus is visible, for example a focus outline that is inset on a filled blue button is not perceivable.

@benelan benelan removed the needs triage Planning workflow - pending design/dev review. label Nov 3, 2021
@benelan benelan added this to the Freezer milestone Nov 3, 2021
@geospatialem geospatialem added design Issues that need design consultation prior to development. a11y Issues related to Accessibility fixes or improvements. labels Jun 29, 2022
@geospatialem
Copy link
Member

Reallocating this issue to tackle in February's priorities.

@geospatialem
Copy link
Member

Re-adjusting the timeline to accommodate upcoming Esri events and will tackle as part of the March priorities in coordination with #4633.

@ashetland
Copy link
Contributor

Proposal to make this a system-wide customization

Add two CSS variables for customization at the root or component level (actual text TBD):

  • --calcite-ui-focus-offset (default to what is currently most common (-2px?))
  • --calcite-ui-focus-color (defaults to ui-brand)

cc: @jcfranco @macandcheese @geospatialem

@ashetland
Copy link
Contributor

Also related: #6588

@geospatialem geospatialem removed the design Issues that need design consultation prior to development. label Mar 24, 2023
@geospatialem geospatialem removed the 1 - assigned Issues that are assigned to a sprint and a team member. label Mar 24, 2023
@geospatialem geospatialem added 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. research Issues that require more in-depth research or multiple team members to resolve or make decision. labels Mar 24, 2023
@geospatialem geospatialem removed the needs triage Planning workflow - pending design/dev review. label Mar 24, 2023
@geospatialem geospatialem added 1 - assigned Issues that are assigned to a sprint and a team member. and removed 0 - new New issues that need assignment. labels Mar 24, 2023
@geospatialem
Copy link
Member

Further research is needed to carry out the above proposal of two exposed CSS vars.

In April we'll research further to assess a time estimate and priority prior to assigning to a future milestone for implementation.

@jcfranco jcfranco added 2 - in development Issues that are actively being worked on. and removed 1 - assigned Issues that are assigned to a sprint and a team member. labels Apr 14, 2023
jcfranco added a commit that referenced this issue Apr 24, 2023
**Related Issue:** #3392 

## Summary

Adds the following global CSS props:

* `--calcite-ui-focus-color`
* `--calcite-ui-focus-offset-invert` – inverts the applied offset when
set to `1` or keeps as is when `0`
@jcfranco jcfranco added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 2 - in development Issues that are actively being worked on. labels Apr 24, 2023
@github-actions github-actions bot assigned geospatialem and unassigned jcfranco Apr 24, 2023
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Apr 24, 2023
@geospatialem
Copy link
Member

Verified on master:

--calcite-ui-focus-color: var(--calcite-ui-danger);

button focus var verify
switch focus var verify

--calcite-ui-focus-color: var(--calcite-ui-danger);
--calcite-ui-focus-offset-invert: 1;

button focus var verify with offset invert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. a11y Issues related to Accessibility fixes or improvements. enhancement Issues tied to a new feature or request. research Issues that require more in-depth research or multiple team members to resolve or make decision.
Projects
None yet
Development

No branches or pull requests

8 participants