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

fix(action-bar): include focus-visible polyfilling #4273

Merged

Conversation

inasirhussain
Copy link
Contributor

@inasirhussain inasirhussain commented Apr 16, 2024

Description

For older browser and UXP, we have to rely on focus-visible polyfill to match behaviour with the modern browser where the corresponding pseudo-selector is supported.

Related issue(s)

fixes #4279

Motivation and context

How has this been tested?

  • Test case 1
    1. Go here
    2. Do this
  • Test case 2
    1. Go here
    2. Do this

Screenshots (if appropriate)

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)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

@Westbrook
Copy link
Collaborator

As a member of Adobe, Inc. you should be able to self serve access to this repo and make this PR as a branch, rather than a fork, and enjoy our full CI coverage. Would you be able to set that up and reopen this PR?

Copy link
Collaborator

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplify to only the needed changes and we can adopt this.

In the future, if you were able to work from a branch rather than a fork you'll get more complete CI coverage of these sorts of changes.

packages/action-bar/src/ActionBar.ts Outdated Show resolved Hide resolved
export const actionBarVariants = ['sticky', 'fixed'];

/**
* @element sp-action-bar
* @slot - Content to display with the Action Bar
*/
export class ActionBar extends SpectrumElement {
export class ActionBar extends SizedMixin(
FocusVisiblePolyfillMixin(SpectrumElement)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable for the close button. Would be great if UXP prioritized adding this, as I'm sure there are lots of little places where UI like this falls through the cracks and keeping the polyfill code for something that has been fixed in browser for so long is questionable on our end.

@Westbrook Westbrook changed the title Fixed sp-action-bar to handle focus-visible fix(action-bar): include focus-visible polyfilling Apr 25, 2024
For older browser and UXP, we have to rely on focus-visible polyfill to match behaviour with the modern browser where the corresponding pseud-oselector is supported.
@Westbrook Westbrook force-pushed the inasirhussain/actionbar-focus-visible-fix branch from bdc141a to 5c5171e Compare May 10, 2024 13:10
@Westbrook Westbrook merged commit fd71ca1 into adobe:main May 10, 2024
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants