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

[Label] Wrapped components and focus shifting #8038

Open
2 of 5 tasks
geospatialem opened this issue Oct 23, 2023 · 1 comment
Open
2 of 5 tasks

[Label] Wrapped components and focus shifting #8038

geospatialem opened this issue Oct 23, 2023 · 1 comment
Labels
0 - new New issues that need assignment. ArcGIS Charts Issues logged by ArcGIS Charts team members. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 5 A few days of work, definitely requires updates to tests. has workaround Issues have a workaround available in the meantime. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library

Comments

@geospatialem
Copy link
Member

Check existing issues

Actual Behavior

As identified in #5070 (comment), certain browsers (Chrome, Safari, and Edge) shift focus to the first element when wrapped in label. Also applies to the Charts team.

cc @zaramatheson @AdelheidF @jcfranco

HoldnRelease

Expected Behavior

The behavior is similar to what is observed in native HTML, but there may be a solution that can be explored as Calcite's code is managing the focus behavior.

Reproduction Sample

https://codepen.io/geospatialem/pen/poGvgrO

Reproduction Steps

  1. Open the sample
  2. Click the input and hold the mouse button while moving the mouse over the slider and release the mouse button.
  3. Depending on the browser, observe the following:
    • FF: Focus is not shifted
    • Chrome/Edge/Safari: When doing this workflow the first element, in this case the slider shifts focus
  4. Observe similar behavior on native elements

Reproduction Version

1.9.2

Relevant Info

#5070 addressed when elements are wrapped in a calcite-label that the first element should receive, or steal, focus.

Regression?

No response

Priority impact

p3 - want for upcoming milestone

Impact

No response

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Map Viewer

@geospatialem geospatialem added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. ArcGIS Charts Issues logged by ArcGIS Charts team members. labels Oct 23, 2023
@github-actions github-actions bot added calcite-components Issues specific to the @esri/calcite-components package. p3 - want for upcoming milestone labels Oct 23, 2023
@geospatialem
Copy link
Member Author

There is a workaround, if it fits the use cases for folks, where each element can have its own individual label using the label attribute, also depicted in https://codepen.io/geospatialem/pen/poGvgrO with:

<calcite-label for="my-slider">my label</calcite-label>
  <div>
    <calcite-slider id="my-slider"></calcite-slider>
    <calcite-input label="my label"></calcite-input>
  </div>

@geospatialem geospatialem added the has workaround Issues have a workaround available in the meantime. label Oct 23, 2023
@geospatialem geospatialem added p - medium Issue is non core or affecting less that 60% of people using the library estimate - 5 A few days of work, definitely requires updates to tests. needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Nov 27, 2023
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Jan 10, 2024
@geospatialem geospatialem added impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone and removed p3 - want for upcoming milestone labels May 21, 2024
@geospatialem geospatialem removed this from the 2024-06-25 - Jun Release milestone Jun 3, 2024
@geospatialem geospatialem added the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Jun 3, 2024
@geospatialem geospatialem added this to the 2025-01-28 - Jan Release milestone Jun 3, 2024
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Jun 3, 2024
@geospatialem geospatialem added the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Feb 18, 2025
@geospatialem geospatialem removed this from the 2025-02-25 - Feb Milestone milestone Feb 18, 2025
@DitwanP DitwanP added this to the 2025-08-26 - Aug Milestone milestone Feb 20, 2025
@DitwanP DitwanP removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Charts Issues logged by ArcGIS Charts team members. ArcGIS Map Viewer Issues logged by ArcGIS Map Viewer team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 5 A few days of work, definitely requires updates to tests. has workaround Issues have a workaround available in the meantime. impact - p2 - want for an upcoming milestone User set priority impact status of p2 - want for an upcoming milestone p - medium Issue is non core or affecting less that 60% of people using the library
Projects
None yet
Development

No branches or pull requests

2 participants