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

Use KeyboardEvent.key over deprecated KeyboardEvent.keyCode in the Tabs component #4811

Merged
merged 2 commits into from
Mar 4, 2024

Commits on Mar 1, 2024

  1. Use key over deprecated keyCode in Tabs

    `KeyboardEvent.keyCode` is deprecated. All of the browsers that now run our JavaScript support the modern `KeyboardEvent.key` property.
    
    Update the button component to using `KeyboardEvent.key` instead, removing hardcoded ASCII values in the `keys` map.
    
    Unfortunately Edge 16 uses e.g. “Left" instead of “ArrowLeft”, so we need to add those possible values as well if we want keyboard navigation for tabs to work in that browser.
    
    [1]: https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#navigation_keys
    36degrees committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    93ff75f View commit details
    Browse the repository at this point in the history
  2. Document in CHANGELOG

    36degrees committed Mar 1, 2024
    Configuration menu
    Copy the full SHA
    964a453 View commit details
    Browse the repository at this point in the history