@slotted/angular 0.1.0-beta.4 → 0.1.0-beta.5
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/docs/AGENTS.snippet.md +2 -0
- package/docs/app-shell.examples.md +1 -1
- package/docs/app-shell.json +4 -4
- package/docs/app-shell.md +2 -2
- package/docs/guidelines/README.md +2 -2
- package/docs/guidelines/index.md +1 -1
- package/docs/guidelines/own-elements.md +1 -1
- package/docs/page-header.json +1 -0
- package/docs/page-header.md +1 -1
- package/docs/skills/build-own-element/SKILL.md +6 -6
- package/docs/skills/compose-screen/SKILL.md +6 -6
- package/docs/skills/review-screen/SKILL.md +6 -6
- package/docs/skills/theme-app/SKILL.md +1 -1
- package/docs/skills/waiting-states/SKILL.md +2 -2
- package/docs/tabs.json +13 -3
- package/docs/tabs.md +3 -2
- package/fesm2022/slotted-angular-app-shell.mjs +15 -9
- package/fesm2022/slotted-angular-app-shell.mjs.map +1 -1
- package/fesm2022/slotted-angular-cascader.mjs +7 -1
- package/fesm2022/slotted-angular-cascader.mjs.map +1 -1
- package/fesm2022/slotted-angular-chart.mjs +13 -3
- package/fesm2022/slotted-angular-chart.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-picker.mjs +4 -6
- package/fesm2022/slotted-angular-date-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-date-range-picker.mjs +4 -6
- package/fesm2022/slotted-angular-date-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-picker.mjs +4 -6
- package/fesm2022/slotted-angular-datetime-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-datetime-range-picker.mjs +4 -6
- package/fesm2022/slotted-angular-datetime-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-entity-picker.mjs +7 -1
- package/fesm2022/slotted-angular-entity-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-page-header.mjs +2 -2
- package/fesm2022/slotted-angular-page-header.mjs.map +1 -1
- package/fesm2022/slotted-angular-popover.mjs +7 -1
- package/fesm2022/slotted-angular-popover.mjs.map +1 -1
- package/fesm2022/slotted-angular-scroll-area.mjs +6 -2
- package/fesm2022/slotted-angular-scroll-area.mjs.map +1 -1
- package/fesm2022/slotted-angular-select.mjs +49 -17
- package/fesm2022/slotted-angular-select.mjs.map +1 -1
- package/fesm2022/slotted-angular-stat-card.mjs +2 -2
- package/fesm2022/slotted-angular-stat-card.mjs.map +1 -1
- package/fesm2022/slotted-angular-table.mjs +11 -4
- package/fesm2022/slotted-angular-table.mjs.map +1 -1
- package/fesm2022/slotted-angular-tabs.mjs +13 -6
- package/fesm2022/slotted-angular-tabs.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-picker.mjs +4 -6
- package/fesm2022/slotted-angular-time-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-time-range-picker.mjs +4 -6
- package/fesm2022/slotted-angular-time-range-picker.mjs.map +1 -1
- package/fesm2022/slotted-angular-tooltip.mjs +7 -1
- package/fesm2022/slotted-angular-tooltip.mjs.map +1 -1
- package/package.json +3 -3
- package/types/slotted-angular-app-shell.d.ts +5 -3
- package/types/slotted-angular-app-shell.d.ts.map +1 -1
- package/types/slotted-angular-cascader.d.ts.map +1 -1
- package/types/slotted-angular-chart.d.ts +1 -0
- package/types/slotted-angular-chart.d.ts.map +1 -1
- package/types/slotted-angular-date-picker.d.ts +0 -1
- package/types/slotted-angular-date-picker.d.ts.map +1 -1
- package/types/slotted-angular-date-range-picker.d.ts +0 -1
- package/types/slotted-angular-date-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-picker.d.ts +0 -1
- package/types/slotted-angular-datetime-picker.d.ts.map +1 -1
- package/types/slotted-angular-datetime-range-picker.d.ts +0 -1
- package/types/slotted-angular-datetime-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-entity-picker.d.ts.map +1 -1
- package/types/slotted-angular-popover.d.ts.map +1 -1
- package/types/slotted-angular-scroll-area.d.ts.map +1 -1
- package/types/slotted-angular-select.d.ts +12 -2
- package/types/slotted-angular-select.d.ts.map +1 -1
- package/types/slotted-angular-table.d.ts +1 -0
- package/types/slotted-angular-table.d.ts.map +1 -1
- package/types/slotted-angular-tabs.d.ts +3 -4
- package/types/slotted-angular-tabs.d.ts.map +1 -1
- package/types/slotted-angular-time-picker.d.ts +0 -1
- package/types/slotted-angular-time-picker.d.ts.map +1 -1
- package/types/slotted-angular-time-range-picker.d.ts +0 -1
- package/types/slotted-angular-time-range-picker.d.ts.map +1 -1
- package/types/slotted-angular-tooltip.d.ts.map +1 -1
package/docs/AGENTS.snippet.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
## Slotted UI (@slotted/angular)
|
|
2
2
|
|
|
3
|
+
Paths below are relative to the directory that holds node_modules.
|
|
4
|
+
|
|
3
5
|
Before writing or changing UI, read `node_modules/@slotted/angular/docs/index.md`, then the file of each family you use. These files match the installed version: prefer them over prior knowledge of the library.
|
|
4
6
|
|
|
5
7
|
- Import the standalone directives from the family entry point that each file's Import section shows (`@slotted/angular/<family>`), and place each on the native element its selector names: `<button slButton>`.
|
|
@@ -281,7 +281,7 @@ Excerpt — not a complete module
|
|
|
281
281
|
|
|
282
282
|
### The first thing a keyboard meets
|
|
283
283
|
|
|
284
|
-
Press Tab from the top of the frame: a link to the content appears, then one to the navigation, then one to the pane — one per region that rendered and is open, out of the flow until focused. The content region
|
|
284
|
+
Press Tab from the top of the frame: a link to the content appears, then one to the navigation, then one to the pane — one per region that rendered and is open, out of the flow until focused. The link makes the content region focusable for that one focus, so it moves the focus as well as the scroll.
|
|
285
285
|
|
|
286
286
|
Excerpt — not a complete module
|
|
287
287
|
|
package/docs/app-shell.json
CHANGED
|
@@ -230,9 +230,9 @@
|
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
232
|
"part": "main",
|
|
233
|
-
"element": "main
|
|
233
|
+
"element": "main",
|
|
234
234
|
"required": true,
|
|
235
|
-
"purpose": "The main landmark and the skip link’s destination.
|
|
235
|
+
"purpose": "The main landmark and the skip link’s destination. The skip link and focusMain() write tabindex=\"-1\" for the focus they move, and blur or the next pointer press inside removes it: a main focusable all the time takes the focus of every click on its text, and the next key draws the ring around the page."
|
|
236
236
|
},
|
|
237
237
|
{
|
|
238
238
|
"part": "progress",
|
|
@@ -559,7 +559,7 @@
|
|
|
559
559
|
"The structure is the WAI-ARIA APG’s Landmark Regions (w3.org/WAI/ARIA/apg/practices/landmark-regions/), and every one of the five is earned from the element rather than written as a role: header in the context of the body is banner, nav is navigation, main is main, aside is complementary, footer is contentinfo. The root is a div for exactly that reason — a main inside a sectioning element stops being a landmark, and the shell has to be placeable anywhere.",
|
|
560
560
|
"Both controls are the APG’s Disclosure pattern (w3.org/WAI/ARIA/apg/patterns/disclosure/): real buttons, so Enter and Space activate them natively, carrying aria-expanded and aria-controls pointing at their region. One departure is written and costed: under collapsedTo=\"rail\" the navigation does not disappear, it narrows — aria-expanded is still true or false about the region’s full form, and the region stays in the tab order because a rail whose destinations cannot be reached is not a rail. The pane has no such departure: closed, it leaves the layout and the tab order.",
|
|
561
561
|
"A document with more than one navigation or complementary landmark needs a unique label on each, so both regions carry the family’s strings and a consumer may replace either per instance. Each control’s own name changes with the state — “Open navigation” and “Close navigation”, “Open side panel” and “Close side panel” — because a control whose name never changes leaves the reader to infer the state from aria-expanded alone.",
|
|
562
|
-
"The skip links are written from the regions that rendered and are open, so no link ever points at a target nobody built or the reader closed, and main
|
|
562
|
+
"The skip links are written from the regions that rendered and are open, so no link ever points at a target nobody built or the reader closed, and the main link writes tabindex=\"-1\" on main before it moves the focus: without it the browser moves the scroll and leaves the focus behind in Safari and Firefox. Blur or the next pointer press inside removes the attribute, so a click on the content never focuses main.",
|
|
563
563
|
"While an overlaid region is modal, @slotted/core/focus contains the keyboard inside it and returns it to the control that opened it on close, and every region beside it — the banner included — takes inert, so Tab cannot reach them and a screen reader does not read them. The ways out are Escape, the veil, a destination, and whatever control the product put in the panel. Two layers can be open together only with both modes forced, and @slotted/core/dismissable-layer keeps one stack, so Escape reaches the topmost.",
|
|
564
564
|
"The pane’s edge is the APG’s Window Splitter (w3.org/WAI/ARIA/apg/patterns/windowsplitter/): a focusable separator with aria-orientation=\"vertical\", aria-controls pointing at the pane and aria-valuemin, aria-valuemax and aria-valuenow as whole percentages of the shell, named “Resize panel”. ArrowLeft and ArrowRight move it sixteen pixels, sixty-four with Shift, by the direction on the screen — so ArrowLeft grows an end pane and shrinks a start one, mirrored in right-to-left — and Home and End go to the limits.",
|
|
565
565
|
"Nothing important depends on hover, the frame answers its own inline size rather than the window’s — which is what makes a 400% zoom behave like a narrow window — and every transition comes from the motion scale, so prefers-reduced-motion collapses all of them at once."
|
|
@@ -786,7 +786,7 @@
|
|
|
786
786
|
{
|
|
787
787
|
"id": "skipLinks",
|
|
788
788
|
"title": "The first thing a keyboard meets",
|
|
789
|
-
"note": "Press Tab from the top of the frame: a link to the content appears, then one to the navigation, then one to the pane — one per region that rendered and is open, out of the flow until focused. The content region
|
|
789
|
+
"note": "Press Tab from the top of the frame: a link to the content appears, then one to the navigation, then one to the pane — one per region that rendered and is open, out of the flow until focused. The link makes the content region focusable for that one focus, so it moves the focus as well as the scroll.",
|
|
790
790
|
"language": "html",
|
|
791
791
|
"source": "<div slAppShell [messages]=\"{ skipToMain: 'Skip to the order' }\">\n <main slAppShellMain>…</main>\n</div>\n",
|
|
792
792
|
"verdict": "excerpt"
|
package/docs/app-shell.md
CHANGED
|
@@ -116,7 +116,7 @@ export class AppShellBasic {}
|
|
|
116
116
|
| `nav-body` | div | no |
|
|
117
117
|
| `nav-footer` | div | no |
|
|
118
118
|
| `scrim` | div | no |
|
|
119
|
-
| `main` | main
|
|
119
|
+
| `main` | main | yes |
|
|
120
120
|
| `progress` | the consumer’s element, holding one [slProgressBar] at placement="edge-start" | no |
|
|
121
121
|
| `aside` | aside | no |
|
|
122
122
|
| `aside-resizer` | any element carrying slAppShellAsideResizer | no |
|
|
@@ -200,7 +200,7 @@ export class AppShellBasic {}
|
|
|
200
200
|
- The structure is the WAI-ARIA APG’s Landmark Regions (w3.org/WAI/ARIA/apg/practices/landmark-regions/), and every one of the five is earned from the element rather than written as a role: header in the context of the body is banner, nav is navigation, main is main, aside is complementary, footer is contentinfo. The root is a div for exactly that reason — a main inside a sectioning element stops being a landmark, and the shell has to be placeable anywhere.
|
|
201
201
|
- Both controls are the APG’s Disclosure pattern (w3.org/WAI/ARIA/apg/patterns/disclosure/): real buttons, so Enter and Space activate them natively, carrying aria-expanded and aria-controls pointing at their region. One departure is written and costed: under collapsedTo="rail" the navigation does not disappear, it narrows — aria-expanded is still true or false about the region’s full form, and the region stays in the tab order because a rail whose destinations cannot be reached is not a rail. The pane has no such departure: closed, it leaves the layout and the tab order.
|
|
202
202
|
- A document with more than one navigation or complementary landmark needs a unique label on each, so both regions carry the family’s strings and a consumer may replace either per instance. Each control’s own name changes with the state — “Open navigation” and “Close navigation”, “Open side panel” and “Close side panel” — because a control whose name never changes leaves the reader to infer the state from aria-expanded alone.
|
|
203
|
-
- The skip links are written from the regions that rendered and are open, so no link ever points at a target nobody built or the reader closed, and main
|
|
203
|
+
- The skip links are written from the regions that rendered and are open, so no link ever points at a target nobody built or the reader closed, and the main link writes tabindex="-1" on main before it moves the focus: without it the browser moves the scroll and leaves the focus behind in Safari and Firefox. Blur or the next pointer press inside removes the attribute, so a click on the content never focuses main.
|
|
204
204
|
- While an overlaid region is modal, @slotted/core/focus contains the keyboard inside it and returns it to the control that opened it on close, and every region beside it — the banner included — takes inert, so Tab cannot reach them and a screen reader does not read them. The ways out are Escape, the veil, a destination, and whatever control the product put in the panel. Two layers can be open together only with both modes forced, and @slotted/core/dismissable-layer keeps one stack, so Escape reaches the topmost.
|
|
205
205
|
- The pane’s edge is the APG’s Window Splitter (w3.org/WAI/ARIA/apg/patterns/windowsplitter/): a focusable separator with aria-orientation="vertical", aria-controls pointing at the pane and aria-valuemin, aria-valuemax and aria-valuenow as whole percentages of the shell, named “Resize panel”. ArrowLeft and ArrowRight move it sixteen pixels, sixty-four with Shift, by the direction on the screen — so ArrowLeft grows an end pane and shrinks a start one, mirrored in right-to-left — and Home and End go to the limits.
|
|
206
206
|
- Nothing important depends on hover, the frame answers its own inline size rather than the window’s — which is what makes a 400% zoom behave like a narrow window — and every transition comes from the motion scale, so prefers-reduced-motion collapses all of them at once.
|
|
@@ -14,8 +14,8 @@ screen:
|
|
|
14
14
|
2. Match the task against the `triggers` in each topic file's front matter.
|
|
15
15
|
Read the topic files that match, and `composition.md` always.
|
|
16
16
|
3. Before writing an element beside a family, read that family's page in
|
|
17
|
-
|
|
18
|
-
`own-elements.md` and
|
|
17
|
+
`..`. Before writing an element no family draws, read
|
|
18
|
+
`own-elements.md` and `../tokens.md`.
|
|
19
19
|
4. Apply the rules by level: a `MUST` broken is a defect, a `SHOULD` broken is
|
|
20
20
|
stated with its reason, a `MAY` is a permission.
|
|
21
21
|
5. A screen is done when each `Check` of the rules read passes.
|
package/docs/guidelines/index.md
CHANGED
|
@@ -79,7 +79,7 @@ Every active rule, one line each. Load this first; load a topic file when the ta
|
|
|
79
79
|
| OV-03 | SHOULD | Where the reader's scope holds one category, the chart is not drawn and one sentence states the numbers it would have compared. | `overviews.md` |
|
|
80
80
|
| OV-04 | SHOULD | The thresholds are stated once in words beside the figures, and a figure past one says so in its own comparison line, on the line the placeholder reserves. | `overviews.md` |
|
|
81
81
|
| OV-05 | SHOULD | A chart takes the `card` `variant` when it is one of two or more peer tiles in one grid with no section heading of its own, and stays `plain` when it is the body of a titled section or the only content of a tab. | `overviews.md` |
|
|
82
|
-
| OE-01 | MUST | An element of the application's own reads only tokens of the groups
|
|
82
|
+
| OE-01 | MUST | An element of the application's own reads only tokens of the groups `../tokens.md` lists for the application. | `own-elements.md` |
|
|
83
83
|
| OE-02 | MUST | Where two states hold at once, the element paints the ground, the edge and the text colour of the stronger, in the order `disabled`, `loading`, `readonly`, `invalid`, `checked`, `selected`, `pressed`, `current`, `complete`, `active`, `hover`; the focus ring of OE-03 is drawn over every state. | `own-elements.md` |
|
|
84
84
|
| OE-03 | MUST | In its `focus-visible` state the element draws an outline of `--slotted-focus-ring-width` in `--slotted-focus-ring-color`, offset by `--slotted-focus-ring-offset`. | `own-elements.md` |
|
|
85
85
|
| OE-04 | MUST | The element's hit area measures at least `--slotted-target-min` in both axes, and at least `--slotted-target-comfortable` under `pointer: coarse`. | `own-elements.md` |
|
|
@@ -18,7 +18,7 @@ the problem, the family is used instead (CP-04).
|
|
|
18
18
|
|
|
19
19
|
Level: MUST
|
|
20
20
|
Applies to: every element of the application's own that paints, spaces or moves
|
|
21
|
-
Rule: An element of the application's own reads only tokens of the groups
|
|
21
|
+
Rule: An element of the application's own reads only tokens of the groups `../tokens.md` lists for the application.
|
|
22
22
|
Why: A token of a family-only group is that family's adjustment and changes with it; an application group is the theme's promise.
|
|
23
23
|
Do: A strip of day cells spaces with `--slotted-space-2`, paints a busy day with `--slotted-tone-warning-surface` and rounds with `--slotted-radius-sm`.
|
|
24
24
|
Don't: A cell takes its height from `--slotted-avatar-size-sm` because the number fit.
|
package/docs/page-header.json
CHANGED
|
@@ -403,6 +403,7 @@
|
|
|
403
403
|
"--slotted-line-height-md",
|
|
404
404
|
"--slotted-line-height-sm",
|
|
405
405
|
"--slotted-line-height-xl",
|
|
406
|
+
"--slotted-page-header-backdrop-filter",
|
|
406
407
|
"--slotted-page-header-background",
|
|
407
408
|
"--slotted-page-header-border",
|
|
408
409
|
"--slotted-page-header-control-size",
|
package/docs/page-header.md
CHANGED
|
@@ -107,7 +107,7 @@ Excerpt — not a complete module
|
|
|
107
107
|
|
|
108
108
|
## Tokens
|
|
109
109
|
|
|
110
|
-
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-radius`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-2xl`, `--slotted-font-size-3xl`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xl`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-2xl`, `--slotted-line-height-3xl`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xl`, `--slotted-page-header-background`, `--slotted-page-header-border`, `--slotted-page-header-control-size`, `--slotted-page-header-description-measure`, `--slotted-page-header-gap`, `--slotted-page-header-heading-size-lg`, `--slotted-page-header-heading-size-md`, `--slotted-page-header-heading-size-sm`, `--slotted-page-header-inset`, `--slotted-page-header-padding-block`, `--slotted-page-header-radius`, `--slotted-page-header-shadow`, `--slotted-page-header-snapped-heading-size-lg`, `--slotted-page-header-snapped-heading-size-md`, `--slotted-page-header-snapped-heading-size-sm`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-shadow-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-surface`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-toolbar-inset`, `--slotted-z-index-sticky`
|
|
110
|
+
`--slotted-border-subtle`, `--slotted-border-width-thin`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-radius`, `--slotted-disabled-foreground`, `--slotted-duration-medium`, `--slotted-duration-short`, `--slotted-easing-standard`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-font-family-heading`, `--slotted-font-family-sans`, `--slotted-font-size-2xl`, `--slotted-font-size-3xl`, `--slotted-font-size-lg`, `--slotted-font-size-md`, `--slotted-font-size-sm`, `--slotted-font-size-xl`, `--slotted-font-weight-medium`, `--slotted-font-weight-semibold`, `--slotted-line-height-2xl`, `--slotted-line-height-3xl`, `--slotted-line-height-lg`, `--slotted-line-height-md`, `--slotted-line-height-sm`, `--slotted-line-height-xl`, `--slotted-page-header-backdrop-filter`, `--slotted-page-header-background`, `--slotted-page-header-border`, `--slotted-page-header-control-size`, `--slotted-page-header-description-measure`, `--slotted-page-header-gap`, `--slotted-page-header-heading-size-lg`, `--slotted-page-header-heading-size-md`, `--slotted-page-header-heading-size-sm`, `--slotted-page-header-inset`, `--slotted-page-header-padding-block`, `--slotted-page-header-radius`, `--slotted-page-header-shadow`, `--slotted-page-header-snapped-heading-size-lg`, `--slotted-page-header-snapped-heading-size-md`, `--slotted-page-header-snapped-heading-size-sm`, `--slotted-radius-full`, `--slotted-radius-lg`, `--slotted-radius-sm`, `--slotted-shadow-sm`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-3`, `--slotted-space-4`, `--slotted-space-5`, `--slotted-space-6`, `--slotted-surface`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-subtle-hover`, `--slotted-tone-accent-surface`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`, `--slotted-toolbar-inset`, `--slotted-z-index-sticky`
|
|
111
111
|
|
|
112
112
|
## Examples
|
|
113
113
|
|
|
@@ -11,9 +11,9 @@ built from the same theme as the families beside it.
|
|
|
11
11
|
|
|
12
12
|
## 1. Prove that no family answers
|
|
13
13
|
|
|
14
|
-
1. Read
|
|
14
|
+
1. Read `../../index.md` and list the families whose line is near the
|
|
15
15
|
element.
|
|
16
|
-
2. Read
|
|
16
|
+
2. Read `../../<family>.md` for each: its anatomy, its slots, its axes.
|
|
17
17
|
When a family draws the element, or names a slot that holds it, the family
|
|
18
18
|
is used (CP-01).
|
|
19
19
|
3. When a family draws a part of the element — a toggle, a popup, a list, a
|
|
@@ -33,7 +33,7 @@ Free, decided by the problem:
|
|
|
33
33
|
Fixed, read from the theme:
|
|
34
34
|
|
|
35
35
|
- every value it paints comes from a token of the group
|
|
36
|
-
|
|
36
|
+
`../../tokens.md` lists for that decision (OE-01, CP-05);
|
|
37
37
|
- a tone carries the meaning the `tone` group gives it, and a data series takes
|
|
38
38
|
the `data` slots in order;
|
|
39
39
|
- how its states yield, how focus is drawn, how large a target is, what forced
|
|
@@ -43,7 +43,7 @@ A new appearance is a new combination of tokens, never a new value.
|
|
|
43
43
|
|
|
44
44
|
## 3. Map each decision to a group
|
|
45
45
|
|
|
46
|
-
| Decision | Group in
|
|
46
|
+
| Decision | Group in `../../tokens.md` |
|
|
47
47
|
| ---------------------------------------------- | --------------------------------------------------- |
|
|
48
48
|
| Distance between parts, inner padding | `space` |
|
|
49
49
|
| Corners | `radius` |
|
|
@@ -84,7 +84,7 @@ why no token covers it (CP-05).
|
|
|
84
84
|
|
|
85
85
|
## 5. Done
|
|
86
86
|
|
|
87
|
-
1. Each `Check` of
|
|
87
|
+
1. Each `Check` of `../../guidelines/own-elements.md` passes.
|
|
88
88
|
2. The element's CSS holds no colour or length literal without its comment.
|
|
89
89
|
3. Every custom property the element reads is listed in
|
|
90
|
-
|
|
90
|
+
`../../tokens.md` above "Read by their family only".
|
|
@@ -28,18 +28,18 @@ topics.
|
|
|
28
28
|
|
|
29
29
|
## 2. Read
|
|
30
30
|
|
|
31
|
-
1.
|
|
32
|
-
2.
|
|
31
|
+
1. `../../guidelines/index.md`.
|
|
32
|
+
2. `../../guidelines/composition.md`, always.
|
|
33
33
|
3. The topic of step 1. Add `layout-alignment.md` and `shell-composition.md`
|
|
34
34
|
when the screen places controls in a row or in the application frame.
|
|
35
35
|
4. Add `errors-and-conflicts.md` and `reading-permissions.md` when the screen
|
|
36
36
|
writes data or reads under a role.
|
|
37
37
|
5. When the screen writes an element of its own, follow
|
|
38
|
-
|
|
38
|
+
`../../skills/build-own-element/SKILL.md`.
|
|
39
39
|
|
|
40
40
|
## 3. Read each family before writing beside it
|
|
41
41
|
|
|
42
|
-
For each family the screen uses, read
|
|
42
|
+
For each family the screen uses, read `../../<family>.md` — its anatomy,
|
|
43
43
|
its slots, its axes (CP-01). When the family names a slot for an element, the
|
|
44
44
|
element stands in that slot.
|
|
45
45
|
|
|
@@ -65,12 +65,12 @@ element stands in that slot.
|
|
|
65
65
|
rows is a `data-grid`, which windows its rows (LP-14).
|
|
66
66
|
- Where no anatomy answers the problem, the screen writes an element of its
|
|
67
67
|
own instead of bending a family into a shape it does not have (CP-04). That
|
|
68
|
-
element is built with
|
|
68
|
+
element is built with `../../skills/build-own-element/SKILL.md`.
|
|
69
69
|
|
|
70
70
|
## 5. Waits
|
|
71
71
|
|
|
72
72
|
Every region filled by a request and every control that starts one follow
|
|
73
|
-
|
|
73
|
+
`../../skills/waiting-states/SKILL.md`.
|
|
74
74
|
|
|
75
75
|
## 6. Done
|
|
76
76
|
|
|
@@ -12,20 +12,20 @@ A review answers one question per rule read: does the screen pass the rule's
|
|
|
12
12
|
|
|
13
13
|
1. List the screen's files: its component, its template, its stylesheet and
|
|
14
14
|
the requests it starts.
|
|
15
|
-
2. List the families it imports, and read
|
|
15
|
+
2. List the families it imports, and read `../../<family>.md` for each.
|
|
16
16
|
3. List the elements of the screen's own: every element that is not a family,
|
|
17
17
|
with the CSS that paints it.
|
|
18
18
|
4. Classify the screen with the table in step 1 of
|
|
19
|
-
|
|
19
|
+
`../../skills/compose-screen/SKILL.md`.
|
|
20
20
|
|
|
21
21
|
## 2. Read
|
|
22
22
|
|
|
23
|
-
1.
|
|
24
|
-
|
|
23
|
+
1. `../../guidelines/index.md` and
|
|
24
|
+
`../../guidelines/composition.md`.
|
|
25
25
|
2. The topics of the classification, and each topic whose `triggers` the
|
|
26
26
|
screen matches.
|
|
27
27
|
3. `own-elements.md` when step 1 listed an element of the screen's own.
|
|
28
|
-
4.
|
|
28
|
+
4. `../../skills/waiting-states/SKILL.md` when the screen starts a
|
|
29
29
|
request.
|
|
30
30
|
|
|
31
31
|
## 3. Sweep the code
|
|
@@ -65,6 +65,6 @@ deviation. The screen passes when no `MUST` finding remains.
|
|
|
65
65
|
1. Fix every `MUST` finding, then each `SHOULD` finding the request covers.
|
|
66
66
|
2. A fix uses what the family offers — its state, its slot, its axis — and
|
|
67
67
|
never CSS on its parts.
|
|
68
|
-
3. A literal becomes a token of the group
|
|
68
|
+
3. A literal becomes a token of the group `../../tokens.md` lists for
|
|
69
69
|
that decision.
|
|
70
70
|
4. Run the searches of step 3 again on the changed files: none finds anything.
|
|
@@ -17,7 +17,7 @@ Take the first row that reaches the change.
|
|
|
17
17
|
| The brand colour, or the colour of one intent | a seed: `--slotted-seed-accent` or another name of `SEED_NAMES` | the theme's `seeds`, or a scope |
|
|
18
18
|
| Light, dark, high contrast, or the system's preference | the scheme: `light`, `dark`, `high-contrast`, `system` | `data-slotted-scheme`, or the scheme of the `slThemeScope` directive from `@slotted/angular/theme` |
|
|
19
19
|
| How tight controls and rows are | the density: `comfortable`, `compact`, `dense` | `data-slotted-density`, or the density of the `slThemeScope` directive from `@slotted/angular/theme` |
|
|
20
|
-
| Spacing, corners, type, lines, shadows or motion | a token of a group in
|
|
20
|
+
| Spacing, corners, type, lines, shadows or motion | a token of a group in `../../tokens.md` | the theme's `base`; `schemes` for a value per scheme; `densities` per density |
|
|
21
21
|
| One family's look | a token the family's page lists under Tokens | the theme's `components` |
|
|
22
22
|
| What no token reaches | a theme rule | the theme's `rules` |
|
|
23
23
|
|
|
@@ -12,8 +12,8 @@ pending screen occupy the same boxes.
|
|
|
12
12
|
The failure this skill prevents: three grey bars of equal length where a table,
|
|
13
13
|
a card and a list should have been.
|
|
14
14
|
|
|
15
|
-
Rules cited here are in
|
|
16
|
-
named here has its page:
|
|
15
|
+
Rules cited here are in `../../guidelines/async-feedback.md`. Each family
|
|
16
|
+
named here has its page: `../../<family>.md`.
|
|
17
17
|
|
|
18
18
|
## 1. Which indicator answers which wait
|
|
19
19
|
|
package/docs/tabs.json
CHANGED
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"label",
|
|
79
79
|
"end",
|
|
80
80
|
"dismiss",
|
|
81
|
+
"marker",
|
|
81
82
|
"panel",
|
|
82
83
|
"scroll",
|
|
83
84
|
"actions"
|
|
@@ -108,7 +109,7 @@
|
|
|
108
109
|
"part": "item",
|
|
109
110
|
"element": "the slTab host, with role=\"presentation\"",
|
|
110
111
|
"required": true,
|
|
111
|
-
"purpose": "One tab and its optional close button. It exists because a button cannot contain a button, and
|
|
112
|
+
"purpose": "One tab and its optional close button. It exists because a button cannot contain a button, and it carries the hover bar under the tab. A class or an attribute written on slTab lands on it."
|
|
112
113
|
},
|
|
113
114
|
{
|
|
114
115
|
"part": "tab",
|
|
@@ -140,6 +141,12 @@
|
|
|
140
141
|
"required": false,
|
|
141
142
|
"purpose": "The close button. It has tabindex=\"-1\", so the arrow keys move between tabs only, and it stays in the accessibility tree, so a screen reader can press it. From the keyboard, Delete closes the focused tab, which aria-keyshortcuts on the tab announces."
|
|
142
143
|
},
|
|
144
|
+
{
|
|
145
|
+
"part": "marker",
|
|
146
|
+
"element": "span, aria-hidden",
|
|
147
|
+
"required": false,
|
|
148
|
+
"purpose": "The bar under the selected tab. The list draws one and slides it between tabs; it spans the tab’s content box, never the close button. --slotted-tabs-marker-size, --slotted-tabs-marker-radius and --slotted-tabs-marker-inset shape it, and the hover bar takes the same geometry at --slotted-tabs-hover-marker-opacity."
|
|
149
|
+
},
|
|
143
150
|
{
|
|
144
151
|
"part": "panel",
|
|
145
152
|
"element": "the element carrying slTabPanel, with role=\"tabpanel\"",
|
|
@@ -369,7 +376,7 @@
|
|
|
369
376
|
"The paging controls are aria-hidden and outside the Tab sequence, because the arrow keys reach every tab and scroll it into view. Cloudscape’s guidance warns against extra Tab stops between a tab list and its panel.",
|
|
370
377
|
"A list that starts to overflow scrolls the selected tab into view once its paging controls are drawn, so the selected tab is not left behind the end control.",
|
|
371
378
|
"Each tab names its panel with aria-controls and each panel names its tab with aria-labelledby. The ids come from the value, with the characters an id cannot hold escaped rather than replaced, so two values that differ only by a space never share a panel.",
|
|
372
|
-
"The selected tab is never shown by colour alone: the marker is a bar
|
|
379
|
+
"The selected tab is never shown by colour alone: the marker is a bar never thinner than a thick border, which stays visible in the high-contrast scheme, where the theme paints every surface Canvas and the fill of the contained variant disappears.",
|
|
373
380
|
"A panel carries tabindex=\"0\", so the Tab key reaches it from the list. The pattern permits that stop even when the panel’s first content is focusable."
|
|
374
381
|
]
|
|
375
382
|
}
|
|
@@ -415,7 +422,6 @@
|
|
|
415
422
|
"--slotted-radius-full",
|
|
416
423
|
"--slotted-radius-md",
|
|
417
424
|
"--slotted-radius-sm",
|
|
418
|
-
"--slotted-radius-xs",
|
|
419
425
|
"--slotted-shadow-xs",
|
|
420
426
|
"--slotted-space-1",
|
|
421
427
|
"--slotted-space-2",
|
|
@@ -439,8 +445,12 @@
|
|
|
439
445
|
"--slotted-tabs-hover-background",
|
|
440
446
|
"--slotted-tabs-hover-color",
|
|
441
447
|
"--slotted-tabs-hover-marker-color",
|
|
448
|
+
"--slotted-tabs-hover-marker-opacity",
|
|
442
449
|
"--slotted-tabs-list-gap",
|
|
443
450
|
"--slotted-tabs-marker-color",
|
|
451
|
+
"--slotted-tabs-marker-inset",
|
|
452
|
+
"--slotted-tabs-marker-radius",
|
|
453
|
+
"--slotted-tabs-marker-size",
|
|
444
454
|
"--slotted-tabs-scroll-color",
|
|
445
455
|
"--slotted-tabs-selected-color",
|
|
446
456
|
"--slotted-tabs-track-color",
|
package/docs/tabs.md
CHANGED
|
@@ -136,6 +136,7 @@ export class TabsBasic {
|
|
|
136
136
|
| `label` | span | yes |
|
|
137
137
|
| `end` | the element carrying slTabEnd | no |
|
|
138
138
|
| `dismiss` | button | no |
|
|
139
|
+
| `marker` | span, aria-hidden | no |
|
|
139
140
|
| `panel` | the element carrying slTabPanel, with role="tabpanel" | yes |
|
|
140
141
|
| `scroll` | button | no |
|
|
141
142
|
| `actions` | the element carrying slTabActions | no |
|
|
@@ -199,12 +200,12 @@ export class TabsBasic {
|
|
|
199
200
|
- The paging controls are aria-hidden and outside the Tab sequence, because the arrow keys reach every tab and scroll it into view. Cloudscape’s guidance warns against extra Tab stops between a tab list and its panel.
|
|
200
201
|
- A list that starts to overflow scrolls the selected tab into view once its paging controls are drawn, so the selected tab is not left behind the end control.
|
|
201
202
|
- Each tab names its panel with aria-controls and each panel names its tab with aria-labelledby. The ids come from the value, with the characters an id cannot hold escaped rather than replaced, so two values that differ only by a space never share a panel.
|
|
202
|
-
- The selected tab is never shown by colour alone: the marker is a bar
|
|
203
|
+
- The selected tab is never shown by colour alone: the marker is a bar never thinner than a thick border, which stays visible in the high-contrast scheme, where the theme paints every surface Canvas and the fill of the contained variant disappears.
|
|
203
204
|
- A panel carries tabindex="0", so the Tab key reaches it from the list. The pattern permits that stop even when the panel’s first content is focusable.
|
|
204
205
|
|
|
205
206
|
## Tokens
|
|
206
207
|
|
|
207
|
-
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-font-weight`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-inner-size-lg`, `--slotted-control-inner-size-md`, `--slotted-control-inner-size-sm`, `--slotted-control-letter-spacing`, `--slotted-control-line-height`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-radius-full`, `--slotted-radius-md`, `--slotted-radius-sm`, `--slotted-
|
|
208
|
+
`--slotted-border-strong`, `--slotted-border-subtle`, `--slotted-border-width-thick`, `--slotted-border-width-thin`, `--slotted-control-font-family`, `--slotted-control-font-size-lg`, `--slotted-control-font-size-md`, `--slotted-control-font-size-sm`, `--slotted-control-font-weight`, `--slotted-control-gap-lg`, `--slotted-control-gap-md`, `--slotted-control-gap-sm`, `--slotted-control-height-lg`, `--slotted-control-height-md`, `--slotted-control-height-sm`, `--slotted-control-icon-size-lg`, `--slotted-control-icon-size-md`, `--slotted-control-icon-size-sm`, `--slotted-control-inner-size-lg`, `--slotted-control-inner-size-md`, `--slotted-control-inner-size-sm`, `--slotted-control-letter-spacing`, `--slotted-control-line-height`, `--slotted-control-padding-inline-lg`, `--slotted-control-padding-inline-md`, `--slotted-control-padding-inline-sm`, `--slotted-control-radius`, `--slotted-control-transition-duration`, `--slotted-control-transition-easing`, `--slotted-disabled-background`, `--slotted-disabled-border`, `--slotted-disabled-foreground`, `--slotted-duration-short`, `--slotted-easing-enter`, `--slotted-focus-ring-color`, `--slotted-focus-ring-offset`, `--slotted-focus-ring-width`, `--slotted-radius-full`, `--slotted-radius-md`, `--slotted-radius-sm`, `--slotted-shadow-xs`, `--slotted-space-1`, `--slotted-space-2`, `--slotted-space-4`, `--slotted-space-6`, `--slotted-surface`, `--slotted-surface-sunken`, `--slotted-tabs-actions-gap`, `--slotted-tabs-active-background`, `--slotted-tabs-active-marker-color`, `--slotted-tabs-color`, `--slotted-tabs-contained-background`, `--slotted-tabs-contained-selected-background`, `--slotted-tabs-dismiss-active-background`, `--slotted-tabs-dismiss-active-color`, `--slotted-tabs-dismiss-color`, `--slotted-tabs-dismiss-hover-background`, `--slotted-tabs-dismiss-hover-color`, `--slotted-tabs-fade-size`, `--slotted-tabs-gap`, `--slotted-tabs-hover-background`, `--slotted-tabs-hover-color`, `--slotted-tabs-hover-marker-color`, `--slotted-tabs-hover-marker-opacity`, `--slotted-tabs-list-gap`, `--slotted-tabs-marker-color`, `--slotted-tabs-marker-inset`, `--slotted-tabs-marker-radius`, `--slotted-tabs-marker-size`, `--slotted-tabs-scroll-color`, `--slotted-tabs-selected-color`, `--slotted-tabs-track-color`, `--slotted-target-comfortable`, `--slotted-target-min`, `--slotted-text`, `--slotted-text-muted`, `--slotted-tone-accent-solid`, `--slotted-tone-accent-text`, `--slotted-tone-secondary-subtle-active`, `--slotted-tone-secondary-subtle-hover`
|
|
208
209
|
|
|
209
210
|
## Examples
|
|
210
211
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createDismissableLayer } from '@slotted/core/dismissable-layer';
|
|
2
2
|
import { extentAtPoint, holdResizeGesture, anchorsAtStart, stepAmountFromPixels, EXTENT_LARGE_STEP_PX, EXTENT_STEP_PX, stepExtent } from '@slotted/core/extent';
|
|
3
|
-
import { createFocusScope } from '@slotted/core/focus';
|
|
3
|
+
import { createFocusScope, focusTarget } from '@slotted/core/focus';
|
|
4
4
|
import { appShellMessages } from '@slotted/core/i18n';
|
|
5
5
|
import { COMPACT_BELOW, clamp, createWidthGate } from '@slotted/core/measure';
|
|
6
6
|
import { setPortalContainer } from '@slotted/core/portal';
|
|
@@ -580,7 +580,8 @@ class SlAppShell {
|
|
|
580
580
|
}
|
|
581
581
|
/** Moves focus into the content region, which is where a skip link sends it. */
|
|
582
582
|
focusMain() {
|
|
583
|
-
this.nodes.main
|
|
583
|
+
if (this.nodes.main)
|
|
584
|
+
focusTarget(this.nodes.main);
|
|
584
585
|
}
|
|
585
586
|
/**
|
|
586
587
|
* A click that lands on an `a[href]` inside the region asks to close, in the
|
|
@@ -604,7 +605,9 @@ class SlAppShell {
|
|
|
604
605
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: SlAppShell, isStandalone: true, selector: "[slAppShell]", inputs: { navOpen: { classPropertyName: "navOpen", publicName: "navOpen", isSignal: true, isRequired: false, transformFunction: null }, asideOpen: { classPropertyName: "asideOpen", publicName: "asideOpen", isSignal: true, isRequired: false, transformFunction: null }, asideExtent: { classPropertyName: "asideExtent", publicName: "asideExtent", isSignal: true, isRequired: false, transformFunction: null }, minAsideExtent: { classPropertyName: "minAsideExtent", publicName: "minAsideExtent", isSignal: true, isRequired: false, transformFunction: null }, maxAsideExtent: { classPropertyName: "maxAsideExtent", publicName: "maxAsideExtent", isSignal: true, isRequired: false, transformFunction: null }, primary: { classPropertyName: "primary", publicName: "primary", isSignal: true, isRequired: false, transformFunction: null }, canvas: { classPropertyName: "canvas", publicName: "canvas", isSignal: true, isRequired: false, transformFunction: null }, navMode: { classPropertyName: "navMode", publicName: "navMode", isSignal: true, isRequired: false, transformFunction: null }, navSide: { classPropertyName: "navSide", publicName: "navSide", isSignal: true, isRequired: false, transformFunction: null }, navSize: { classPropertyName: "navSize", publicName: "navSize", isSignal: true, isRequired: false, transformFunction: null }, asideMode: { classPropertyName: "asideMode", publicName: "asideMode", isSignal: true, isRequired: false, transformFunction: null }, asideSize: { classPropertyName: "asideSize", publicName: "asideSize", isSignal: true, isRequired: false, transformFunction: null }, collapsedTo: { classPropertyName: "collapsedTo", publicName: "collapsedTo", isSignal: true, isRequired: false, transformFunction: null }, scroll: { classPropertyName: "scroll", publicName: "scroll", isSignal: true, isRequired: false, transformFunction: null }, separation: { classPropertyName: "separation", publicName: "separation", isSignal: true, isRequired: false, transformFunction: null }, modal: { classPropertyName: "modal", publicName: "modal", isSignal: true, isRequired: false, transformFunction: null }, escape: { classPropertyName: "escape", publicName: "escape", isSignal: true, isRequired: false, transformFunction: null }, outsidePress: { classPropertyName: "outsidePress", publicName: "outsidePress", isSignal: true, isRequired: false, transformFunction: null }, back: { classPropertyName: "back", publicName: "back", isSignal: true, isRequired: false, transformFunction: null }, closeOnNavigate: { classPropertyName: "closeOnNavigate", publicName: "closeOnNavigate", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navOpen: "navOpenChange", asideOpen: "asideOpenChange", asideExtent: "asideExtentChange", navOpenChangeRequest: "navOpenChangeRequest", asideOpenChangeRequest: "asideOpenChangeRequest", asideExtentChangeRequest: "asideExtentChangeRequest" }, host: { attributes: { "data-ui": "app-shell", "data-part": "root" }, listeners: { "click": "onClick($event)" }, properties: { "attr.data-primary": "resolvedPrimary()", "attr.data-canvas": "resolvedCanvas()", "attr.data-nav-mode": "resolvedMode()", "attr.data-aside-mode": "resolvedAsideMode()", "attr.data-nav-side": "resolvedNavSide()", "attr.data-nav-size": "resolvedNavSize()", "attr.data-aside-size": "resolvedAsideSize()", "attr.data-collapsed-to": "resolvedCollapsedTo()", "attr.data-scroll": "resolvedScroll()", "attr.data-separation": "resolvedSeparation()", "attr.data-open": "navShownOpen() ? '' : null", "attr.data-dragging": "asideDragging() ? '' : null" } }, viewQueries: [{ propertyName: "veilRef", first: true, predicate: ["scrim"], descendants: true, isSignal: true }], exportAs: ["slAppShell"], ngImport: i0, template: `@if (skipTargets().length > 0) {
|
|
605
606
|
<div data-part="skip">
|
|
606
607
|
@for (target of skipTargets(); track target.href) {
|
|
607
|
-
<a [href]="'#' + target.href"
|
|
608
|
+
<a [href]="'#' + target.href" (click)="target.href === mainId && focusMain()">{{
|
|
609
|
+
target.label
|
|
610
|
+
}}</a>
|
|
608
611
|
}
|
|
609
612
|
</div>
|
|
610
613
|
}
|
|
@@ -619,7 +622,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
619
622
|
args: [{ selector: '[slAppShell]', standalone: true, exportAs: 'slAppShell', template: `@if (skipTargets().length > 0) {
|
|
620
623
|
<div data-part="skip">
|
|
621
624
|
@for (target of skipTargets(); track target.href) {
|
|
622
|
-
<a [href]="'#' + target.href"
|
|
625
|
+
<a [href]="'#' + target.href" (click)="target.href === mainId && focusMain()">{{
|
|
626
|
+
target.label
|
|
627
|
+
}}</a>
|
|
623
628
|
}
|
|
624
629
|
</div>
|
|
625
630
|
}
|
|
@@ -816,9 +821,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
816
821
|
/**
|
|
817
822
|
* The `main` landmark, and the skip link's destination.
|
|
818
823
|
*
|
|
819
|
-
* `tabindex
|
|
820
|
-
*
|
|
821
|
-
*
|
|
824
|
+
* It carries no `tabindex` of its own: the skip link and `focusMain()` write
|
|
825
|
+
* `tabindex="-1"` for the one focus they move (`focusTarget`), and the blur or
|
|
826
|
+
* the next pointer press inside removes it. A `main` focusable all the time
|
|
827
|
+
* takes the focus of every click on its text, and the next key draws the ring
|
|
828
|
+
* around the page. A `tabindex` the consumer writes stays.
|
|
822
829
|
*/
|
|
823
830
|
class SlAppShellMain {
|
|
824
831
|
shell = attach('main');
|
|
@@ -833,7 +840,7 @@ class SlAppShellMain {
|
|
|
833
840
|
inject(DestroyRef).onDestroy(remove);
|
|
834
841
|
}
|
|
835
842
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlAppShellMain, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
836
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlAppShellMain, isStandalone: true, selector: "main[slAppShellMain]", host: { attributes: { "data-part": "main"
|
|
843
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", type: SlAppShellMain, isStandalone: true, selector: "main[slAppShellMain]", host: { attributes: { "data-part": "main" }, properties: { "attr.id": "elementId", "attr.aria-busy": "busy()" } }, exportAs: ["slAppShellMain"], ngImport: i0 });
|
|
837
844
|
}
|
|
838
845
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SlAppShellMain, decorators: [{
|
|
839
846
|
type: Directive,
|
|
@@ -843,7 +850,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImpor
|
|
|
843
850
|
exportAs: 'slAppShellMain',
|
|
844
851
|
host: {
|
|
845
852
|
'data-part': 'main',
|
|
846
|
-
tabindex: '-1',
|
|
847
853
|
'[attr.id]': 'elementId',
|
|
848
854
|
'[attr.aria-busy]': 'busy()',
|
|
849
855
|
},
|