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(cdk/a11y): re-apply the high contrast mode class when the forced-colors media query changes #25088

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

crisbeto
Copy link
Member

Adds some logic to reapply the high contrast mode class when the forced-colors media query changes so that the user doesn't have to refresh the page.

Also reworks the testing setup for the HighContrastMode detector, because it was constructing the detector manually.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent Accessibility This issue is related to accessibility (a11y) target: patch This PR is targeted for the next patch release labels Jun 16, 2022
…colors media query changes

Adds some logic to reapply the high contrast mode class when the `forced-colors` media query changes so that the user doesn't have to refresh the page.

Also reworks the testing setup for the `HighContrastMode` detector, because it was constructing the detector manually.
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jun 16, 2022
@crisbeto crisbeto self-assigned this Jun 16, 2022
@crisbeto crisbeto merged commit bc81e7d into angular:main Jun 16, 2022
crisbeto added a commit that referenced this pull request Jun 16, 2022
…colors media query changes (#25088)

Adds some logic to reapply the high contrast mode class when the `forced-colors` media query changes so that the user doesn't have to refresh the page.

Also reworks the testing setup for the `HighContrastMode` detector, because it was constructing the detector manually.

(cherry picked from commit bc81e7d)
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Jun 22, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@angular/cdk](https://github.com/angular/components) | dependencies | patch | [`14.0.1` -> `14.0.2`](https://renovatebot.com/diffs/npm/@angular%2fcdk/14.0.1/14.0.2) |
| [@angular/material](https://github.com/angular/components) | dependencies | patch | [`14.0.1` -> `14.0.2`](https://renovatebot.com/diffs/npm/@angular%2fmaterial/14.0.1/14.0.2) |

---

### Release Notes

<details>
<summary>angular/components</summary>

### [`v14.0.2`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#&#8203;1402-corduroy-collar-2022-06-16)

[Compare Source](angular/components@14.0.1...14.0.2)

##### cdk

| Commit | Type | Description |
| -- | -- | -- |
| [08c3867ba6](angular/components@08c3867) | fix | **a11y:** re-apply the high contrast mode class when the forced-colors media query changes ([#&#8203;25088](angular/components#25088)) |
| [59268fa5bf](angular/components@59268fa) | fix | **drag-drop:** constrainPosition not working as expected ([#&#8203;25061](angular/components#25061)) |
| [732969079d](angular/components@7329690) | fix | **testing:** simulate offsetX and offsetY in mouse events |

##### material-experimental

| Commit | Type | Description |
| -- | -- | -- |
| [5aec60c9ca](angular/components@5aec60c) | fix | **mdc-button:** don't apply styles to icons within the text label ([#&#8203;24929](angular/components#24929)) |
| [d0082e3422](angular/components@d0082e3) | fix | **mdc-chips:** checkmark blending into background in high contrast mode ([#&#8203;25072](angular/components#25072)) |
| [2388fe77e5](angular/components@2388fe7) | fix | **mdc-core:** consolidate mdc theming code under mdc-core ([#&#8203;25084](angular/components#25084)) |
| [7de5f5432b](angular/components@7de5f54) | fix | **mdc-form-field:** replace !important with CSS var ([#&#8203;24964](angular/components#24964)) |
| [8f7394aa3b](angular/components@8f7394a) | fix | **mdc-list:** don't access class before initialization ([#&#8203;25049](angular/components#25049)) |

#### Special Thanks

Jenny Johnson, Kristiyan Kostadinov, Miles Malerba, Paul Gschwendtner and antuxity

<!-- CHANGELOG SPLIT MARKER -->

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1425
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants