Skip to content

Commit

Permalink
fix(action-bar): include focus-visible polyfilling (#4273)
Browse files Browse the repository at this point in the history
* Fixed sp-action-bar to handle focus-visible 

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.

* chore: accept code review

---------

Co-authored-by: Westbrook Johnson <westbrook.johnson@gmail.com>
  • Loading branch information
inasirhussain and Westbrook committed May 10, 2024
1 parent 841ac23 commit fd71ca1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/action-bar/src/ActionBar.ts
Expand Up @@ -23,13 +23,14 @@ import '@spectrum-web-components/button/sp-close-button.js';
import '@spectrum-web-components/field-label/sp-field-label.js';
import actionBarStyles from './action-bar.css.js';
import { ifDefined } from '@spectrum-web-components/base/src/directives.js';
import { FocusVisiblePolyfillMixin } from "@spectrum-web-components/shared/src/focus-visible.js";
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 FocusVisiblePolyfillMixin(SpectrumElement) {
public static override get styles(): CSSResultArray {
return [actionBarStyles];
}
Expand Down

0 comments on commit fd71ca1

Please sign in to comment.