Skip to content

Commit

Permalink
Merge branch 'main' of github.com:adobe/spectrum-web-components into …
Browse files Browse the repository at this point in the history
…nikkimk/fix-menu-a11y
  • Loading branch information
nikkimk committed Feb 6, 2025
2 parents 4aa538a + efada30 commit d4ab737
Show file tree
Hide file tree
Showing 11 changed files with 101 additions and 16 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/chromatic-vrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Setup Job and Install Dependencies
uses: ./.github/actions/setup-job

- name: Generate Custom Elements Manifest
run: yarn docs:analyze

- name: Install dependencies
run: yarn --immutable
- name: Move CEM to Storybook directory
run: cp projects/documentation/custom-elements.json storybook/

- name: Publish to Chromatic
id: chromatic
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [1.1.1](https://github.com/adobe/spectrum-web-components/compare/v1.1.0...v1.1.1) (2025-01-29)

**Note:** Version bump only for package @adobe/spectrum-web-components
### Bug Fixes

- **overlay:** make :focus-visible consistent when using overlay type modal ([#4912](https://github.com/adobe/spectrum-web-components/issues/4912)) ([7a5f786](https://github.com/adobe/spectrum-web-components/commit/7a5f786819ff200f5ae2648e2e2c4db3729050a2)), closes [#5021](https://github.com/adobe/spectrum-web-components/issues/5021)

### Features

- **opacity-checkerboard:** bump CSS version ([#5040](https://github.com/adobe/spectrum-web-components/issues/5040)) ([e3bf6d3](https://github.com/adobe/spectrum-web-components/commit/e3bf6d3c20c8dab6674ad8b1793082372901d155))
- **picker:** add forcePopover property ([#5041](https://github.com/adobe/spectrum-web-components/issues/5041)) ([3651e57](https://github.com/adobe/spectrum-web-components/commit/3651e57a90a05e551e6ee650e8ccc73aa05d3e7c))
- **sp-button-group:** sp-button-group react to size updates ([#5037](https://github.com/adobe/spectrum-web-components/issues/5037)) ([63bc618](https://github.com/adobe/spectrum-web-components/commit/63bc618c18e9d8e39155cc7544814564673893a7))
- **thumbnail:** bump thumbnail to use foundations release ([7490324](https://github.com/adobe/spectrum-web-components/commit/74903245d8dd8e3d39653a7f5296fa91e4562877))

# [1.1.0](https://github.com/adobe/spectrum-web-components/compare/v1.0.3...v1.1.0) (2025-01-29)

Expand Down
4 changes: 3 additions & 1 deletion packages/button-group/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [1.1.1](https://github.com/adobe/spectrum-web-components/compare/v1.1.0...v1.1.1) (2025-01-29)

**Note:** Version bump only for package @spectrum-web-components/button-group
### Features

- **sp-button-group:** sp-button-group react to size updates ([#5037](https://github.com/adobe/spectrum-web-components/issues/5037)) ([63bc618](https://github.com/adobe/spectrum-web-components/commit/63bc618c18e9d8e39155cc7544814564673893a7))

# [1.1.0](https://github.com/adobe/spectrum-web-components/compare/v1.0.3...v1.1.0) (2025-01-29)

Expand Down
4 changes: 3 additions & 1 deletion packages/overlay/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [1.1.1](https://github.com/adobe/spectrum-web-components/compare/v1.1.0...v1.1.1) (2025-01-29)

**Note:** Version bump only for package @spectrum-web-components/overlay
### Bug Fixes

- **overlay:** make :focus-visible consistent when using overlay type modal ([#4912](https://github.com/adobe/spectrum-web-components/issues/4912)) ([7a5f786](https://github.com/adobe/spectrum-web-components/commit/7a5f786819ff200f5ae2648e2e2c4db3729050a2)), closes [#5021](https://github.com/adobe/spectrum-web-components/issues/5021)

# [1.1.0](https://github.com/adobe/spectrum-web-components/compare/v1.0.3...v1.1.0) (2025-01-29)

Expand Down
34 changes: 34 additions & 0 deletions packages/overlay/src/AbstractOverlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,4 +338,38 @@ export class AbstractOverlay extends SpectrumElement {
overlay.placement = options.placement;
overlay.willPreventClose = !!options.notImmediatelyClosable;
}

private iosEventPropagationController?: AbortController;

protected setupIOSEventManagement(): void {
// This is a workaround for a bug in iOS <17 where the event leaks out of the dialog to the element below it.
// Issue - https://github.com/adobe/spectrum-web-components/issues/5042
this.iosEventPropagationController = new AbortController();
this.dialogEl.addEventListener(
'pointerup',
(event) => event.stopPropagation(),
{
capture: true,
signal: this.iosEventPropagationController.signal,
}
);
this.dialogEl.addEventListener(
'touchend',
(event) => event.stopPropagation(),
{
capture: true,
signal: this.iosEventPropagationController.signal,
}
);
}

protected cleanupIOSEventManagement(): void {
this.iosEventPropagationController?.abort();
this.iosEventPropagationController = undefined;
}

override disconnectedCallback(): void {
this.cleanupIOSEventManagement();
super.disconnectedCallback();
}
}
2 changes: 2 additions & 0 deletions packages/overlay/src/OverlayDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export function OverlayDialog<T extends Constructor<AbstractOverlay>>(
if (!targetOpenState) {
const close = (): void => {
el.removeEventListener('close', close);
this.cleanupIOSEventManagement();
finish(el, index);
};
el.addEventListener('close', close);
Expand Down Expand Up @@ -88,6 +89,7 @@ export function OverlayDialog<T extends Constructor<AbstractOverlay>>(
return;
}
this.dialogEl.showModal();
this.setupIOSEventManagement();
};
const finish = (el: OpenableElement, index: number) => (): void => {
if (this.open !== targetOpenState) {
Expand Down
8 changes: 7 additions & 1 deletion packages/picker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [1.1.1](https://github.com/adobe/spectrum-web-components/compare/v1.1.0...v1.1.1) (2025-01-29)

**Note:** Version bump only for package @spectrum-web-components/picker
### Bug Fixes

- **overlay:** make :focus-visible consistent when using overlay type modal ([#4912](https://github.com/adobe/spectrum-web-components/issues/4912)) ([7a5f786](https://github.com/adobe/spectrum-web-components/commit/7a5f786819ff200f5ae2648e2e2c4db3729050a2)), closes [#5021](https://github.com/adobe/spectrum-web-components/issues/5021)

### Features

- **picker:** add forcePopover property ([#5041](https://github.com/adobe/spectrum-web-components/issues/5041)) ([3651e57](https://github.com/adobe/spectrum-web-components/commit/3651e57a90a05e551e6ee650e8ccc73aa05d3e7c))

# [1.1.0](https://github.com/adobe/spectrum-web-components/compare/v1.0.3...v1.1.0) (2025-01-29)

Expand Down
26 changes: 26 additions & 0 deletions packages/picker/stories/picker.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -694,3 +694,29 @@ custom.args = {
open: true,
};
custom.decorators = [isOverlayOpen];

export const BackgroundClickTest = (): TemplateResult => {
return html`
<div style="display: flex; flex-direction: column;">
<sp-picker size="l">
<sp-menu-item value="option-1">Deselect</sp-menu-item>
<sp-menu-item value="option-2">Select Inverse</sp-menu-item>
</sp-picker>
<div style="position: absolute; bottom: 50px;">
<sp-button
@click=${() => {
console.log(
'this button should not have been clicked...'
);
}}
size="l"
>
I shall not be clicked
</sp-button>
</div>
</div>
`;
};
BackgroundClickTest.swc_vrt = {
skip: true,
};
4 changes: 3 additions & 1 deletion packages/thumbnail/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [1.1.1](https://github.com/adobe/spectrum-web-components/compare/v1.1.0...v1.1.1) (2025-01-29)

**Note:** Version bump only for package @spectrum-web-components/thumbnail
### Features

- **thumbnail:** bump thumbnail to use foundations release ([7490324](https://github.com/adobe/spectrum-web-components/commit/74903245d8dd8e3d39653a7f5296fa91e4562877))

# [1.1.0](https://github.com/adobe/spectrum-web-components/compare/v1.0.3...v1.1.0) (2025-01-29)

Expand Down
5 changes: 3 additions & 2 deletions packages/tooltip/src/tooltip.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ governing permissions and limitations under the License.

:host {
display: contents;
white-space: initial;
}

#tooltip {
inline-size: max-content;
width: fit-content;
white-space: initial;
max-width: var(--spectrum-tooltip-max-inline-size);
}

#tip {
Expand Down
4 changes: 3 additions & 1 deletion tools/opacity-checkerboard/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

## [1.1.1](https://github.com/adobe/spectrum-web-components/compare/v1.1.0...v1.1.1) (2025-01-29)

**Note:** Version bump only for package @spectrum-web-components/opacity-checkerboard
### Features

- **opacity-checkerboard:** bump CSS version ([#5040](https://github.com/adobe/spectrum-web-components/issues/5040)) ([e3bf6d3](https://github.com/adobe/spectrum-web-components/commit/e3bf6d3c20c8dab6674ad8b1793082372901d155))

# [1.1.0](https://github.com/adobe/spectrum-web-components/compare/v1.0.3...v1.1.0) (2025-01-29)

Expand Down

0 comments on commit d4ab737

Please sign in to comment.