@jskit-ai/material-web 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - axe judges every text beside an open menu or a snackbar. Vuetify places a menu's content and a snackbar's message in an overlay the size of the window (or of the container it is attached to), transparent and taking no clicks, and axe found that box over every other text on the page and judged none of them (color-contrast incomplete, bgOverlap): 36 texts on mobilynet's page with a menu open, so text no one could read there passed. material.css hides a menu's and a snackbar's overlay and shows what it holds (`.v-overlay:is(.v-menu, .v-snackbar)`, visibility), so nothing changes on screen, clicks and assistive technology reach the same elements (a snackbar's `role="status"` is on its content), and the content is the only box it lays over the page. Select, autocomplete and combobox lists are menus too. A tooltip keeps its overlay, which carries its `role="tooltip"`. A test that asked whether a snackbar's root (`.v-snackbar`) is visible now asks its message (`.v-snackbar__wrapper`): the root is hidden.
6
+ - An active button whose label is drawn in its colour (filled, elevated, text, outlined) shows one state layer at a time, as Material 3 does: hovered, focused or pressed, that state's layer alone. Vuetify added the hover or focus layer to its activated one, 18% or 20% of a text button's colour under its label, which took a primary text button's label to 4.13:1 under the mouse that had just opened its menu; Vuetify draws a button as active while its menu is open, and a filled or elevated one now has no activated layer then either, as when its route is current. A selected tonal button keeps its selected layer under the others: its on-container label keeps 4.5:1 over both.
7
+ shell-web's `colorContrast.browser.test.js` opens a text button's menu and a filled button's, and shows a snackbar, at 1280 and has axe judge every text on the page, and judges every colour and variant active, at rest, hovered, focused and pressed, in light and dark.
8
+
5
9
  - An element an app places absolutely in a button's, chip's, list item's, card's or avatar's content is placed in the control again, as Vuetify places it. 0.1.10 positioned those content parts (`position: relative`) so that axe reads their labels above the state layers, which made each part what such an element is placed in: Vibe64 Online's attention dot, at the top right corner of a 144px button, was drawn on the 120px content inside it, over the RAM and CPU readings it marks. Each content part is now a stacking context of its own (`isolation: isolate`) instead, which keeps it above the layers for the browser and for axe-core 4.14. axe-core 4.11 restarts every stacking context at the top of the page, so it ranks an isolated part under its positioned control and judges none of these labels (color-contrast incomplete, bgOverlap): an app checking contrast with axe needs 4.14. `layering.browser.test.js` places a mark at each of the five controls' top right corner.
6
10
  - A hovered, focused or pressed button's label keeps WCAG's 4.5:1 over its state layer, which `material.css` draws under the label: control's Releases page measured white on a hovered primary button at 4.43:1, on a focused one at 4.08:1, and a focused tonal error button's label at 4.45:1 (axe `color-contrast`, on a phone in light).
7
11
  - Every colour's state layers have Material 3's one opacity (hover 8%, focus and pressed 10%): each Vuetify theme from `materialThemes` sets `--v-theme-<role>-overlay-multiplier` to 1 for every role. Vuetify doubled the layers on a colour whose tone is the theme's opposite (a primary, error or other tone-40 colour in light, a tone-80 one in dark), so a filled or elevated button's hover layer was 16% and its focus layer 20%.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/material-web",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "type": "module",
5
5
  "description": "Exact Material 3 for JSKIT Vuetify apps: seed-generated light and dark schemes, Material Symbols Rounded icon aliases, Roboto Flex and Material 3 component defaults.",
6
6
  "exports": {
@@ -197,32 +197,43 @@
197
197
  /* A filled or elevated button has no activated state layer: Material 3 gives these buttons none (a selected
198
198
  segment is secondary-container), and Vuetify's, the label's colour at 10% over the container, took a primary
199
199
  button's white label under WCAG's 4.5:1 (4.11:1 in JSKIT's fixture theme) for as long as the button stayed
200
- active, as one whose route is current does. Hovered or focused, it shows that state's layer alone. */
201
- .v-btn--active:is(.v-btn--variant-flat, .v-btn--variant-elevated) > .v-btn__overlay {
200
+ active, as one whose route is current does, or whose menu is open (Vuetify draws a menu's button as active
201
+ then). */
202
+ .v-btn:where(.v-btn--active, [aria-haspopup="menu"][aria-expanded="true"]):is(.v-btn--variant-flat,
203
+ .v-btn--variant-elevated) > .v-btn__overlay {
202
204
  opacity: 0;
203
205
  }
204
206
 
205
- .v-btn--active:is(.v-btn--variant-flat, .v-btn--variant-elevated):hover > .v-btn__overlay {
207
+ /* An active button that draws its label in its colour (filled, elevated, text, outlined) shows one state layer at a
208
+ time, as Material 3 does: hovered, focused or pressed, that state's layer alone. Vuetify added it to the activated
209
+ layer, 18% or 20% of a text button's colour under its label, which took a primary label to 4.13:1 under the mouse
210
+ that had just opened its menu. A tonal button's label is its on-container colour, which keeps 4.5:1 over both
211
+ layers, so a selected tonal button keeps its selected layer under the others. */
212
+ .v-btn:where(.v-btn--active, [aria-haspopup="menu"][aria-expanded="true"]):is(.v-btn--variant-flat,
213
+ .v-btn--variant-elevated, .v-btn--variant-text, .v-btn--variant-outlined):hover > .v-btn__overlay {
206
214
  opacity: calc(var(--v-hover-opacity) * var(--v-theme-overlay-multiplier));
207
215
  }
208
216
 
209
- .v-btn--active:is(.v-btn--variant-flat, .v-btn--variant-elevated):focus-visible > .v-btn__overlay {
217
+ .v-btn:where(.v-btn--active, [aria-haspopup="menu"][aria-expanded="true"]):is(.v-btn--variant-flat,
218
+ .v-btn--variant-elevated, .v-btn--variant-text, .v-btn--variant-outlined):focus-visible > .v-btn__overlay {
210
219
  opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
211
220
  }
212
221
 
213
222
  /* The ripple, Material 3's pressed state layer, lies under the label too (above), at its 10%: Vuetify's was 25%,
214
223
  over the hover layer and over the label, so axe judged no pressed label at all. A pressed button shows the ripple
215
- alone, as Material 3 shows one state layer at a time; a selected one keeps its selected layer under it. */
224
+ alone, as Material 3 shows one state layer at a time; a selected tonal one keeps its selected layer under it. */
216
225
  .v-ripple__animation--in {
217
226
  opacity: var(--v-pressed-opacity);
218
227
  }
219
228
 
220
229
  .v-btn:active:not(.v-btn--active) > .v-btn__overlay,
221
- .v-btn--active:active:is(.v-btn--variant-flat, .v-btn--variant-elevated) > .v-btn__overlay {
230
+ .v-btn--active:active:is(.v-btn--variant-flat, .v-btn--variant-elevated, .v-btn--variant-text,
231
+ .v-btn--variant-outlined) > .v-btn__overlay {
222
232
  opacity: 0;
223
233
  }
224
234
 
225
- .v-btn--active:active:not(.v-btn--variant-flat, .v-btn--variant-elevated) > .v-btn__overlay {
235
+ .v-btn--active:active:not(.v-btn--variant-flat, .v-btn--variant-elevated, .v-btn--variant-text,
236
+ .v-btn--variant-outlined) > .v-btn__overlay {
226
237
  opacity: calc(var(--v-activated-opacity) * var(--v-theme-overlay-multiplier));
227
238
  }
228
239
 
@@ -403,6 +414,22 @@
403
414
  display: none;
404
415
  }
405
416
 
417
+ /* An open menu or a snackbar lies over the page only where it draws. Vuetify places a menu's content and a
418
+ snackbar's message in an overlay that spans the whole window (or the container it is attached to), transparent
419
+ and taking no clicks, and axe found that box over every text beside it and judged the contrast of none of them
420
+ (color-contrast incomplete, bgOverlap): 36 texts on mobilynet's page with a menu open. The overlay is hidden and
421
+ what it holds (the content, and the scrim when a menu has one) is shown, so nothing changes on screen and the
422
+ content is the only box it lays over the page; a snackbar's role="status" is on its content. Select,
423
+ autocomplete and combobox lists are menus too. A tooltip keeps its overlay: Vuetify puts its role="tooltip"
424
+ there, which a hidden overlay would take from assistive technology. */
425
+ .v-overlay:is(.v-menu, .v-snackbar) {
426
+ visibility: hidden;
427
+ }
428
+
429
+ .v-overlay:is(.v-menu, .v-snackbar) > * {
430
+ visibility: visible;
431
+ }
432
+
406
433
  /* Segmented buttons (v-btn-toggle): a 40dp pill in the outline role whose segments share its width, each with a 48dp
407
434
  touch target. An unselected segment has no container; the selected one is secondary-container and leads with a
408
435
  check, which takes the place of its icon. */