Skip to content

Commit 690bcf9

Browse files
authored
Merge pull request #506 from webstackdev/maintenance/aria-improvements-to-components
Maintenance/aria improvements to components
2 parents 67a06f7 + 8745fb7 commit 690bcf9

135 files changed

Lines changed: 17637 additions & 8845 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/instructions/general.instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ applyTo: "**"
1717
- Do not leave trailing spaces on lines.
1818
- Do not use run-astro-dev, always use "npm run dev".
1919
- Always create TypeScript files, not JavaScript files.
20+
- For every `*.module.css` file, also create the matching `*.module.css.d.ts` file, import it as `styles`, and access classnames via dot syntax (e.g., `styles.someClass`) instead of bracket syntax.
2021
- Prefer destructured imports over namespace imports when importing specific functions from modules (e.g., `import { resolve } from 'path'` instead of `import * as path from 'path'`).
2122
- Do not access nanostore observables (e.g., `$consent`) directly from components; expose helper/action methods in `@components/scripts/store` and import those instead.
2223
- Preact exists only for the Markdown E2E harness under `src/lib/markdown/__tests__/e2e`; all production UI components must use Lit web components instead of Preact.

_TODO.md

Lines changed: 12 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@ continue
1717

1818
`/domain`
1919

20-
- Entities are part of the domain. They represent state and core business rules, but not persistence logic. Defined primarily by its unique identity, rather than its attributes or properties.
21-
22-
Is an entry point to the domain logic forming the core of the application, modifying state and persistence as needed. This may be a Transaction Script, Service Layer, Application Service, or something similar.
20+
- The Domain is an entry point to the domain logic forming the core of the application, modifying state and persistence as needed. This may be a Transaction Script, Service Layer, Application Service, or something similar. The Domain in ADR relates to the whole of the domain objects, all the entities and their relations as a whole
2321

2422
`/entities` or `entities.ts`
2523

26-
- The responder builds the entire HTTP response from the domain's output which is given to it by the action. The Responder is responsible solely for formatting the final response (e.g., JSON, HTML) to be sent back to the client.
24+
- Entities are part of the domain. They represent state and core business rules, but not persistence logic. Defined primarily by its unique identity, rather than its attributes or properties.
25+
26+
- By any name the Domain Payload Object is a specialized Data Transfer Object. A Data Transfer Object is a fine-grained object, providing properties that mirror or at least shadow properties found on the domain objects that they replicate. A Domain Payload Object is a coarse-grained object that transfers whole domain object instances to the client.
2727

2828
`/responders` or `responders.ts`
2929

30+
- The responder builds the entire HTTP response from the domain's output which is given to it by the action. The Responder is responsible solely for formatting the final response (e.g., JSON, HTML) to be sent back to the client.
3031

3132
### Endpoints:
3233

@@ -145,10 +146,6 @@ cat.structure: Rules related to the document's overall structure, like the prope
145146
cat.tables: Rules for data tables, including headers and associations.
146147
cat.text-alternatives: Rules for ensuring that text alternatives are provided for non-text content, such as images.
147148

148-
## Use the Page Visibility API to pause videos, image carousels, and animations
149-
150-
Stop unnecessary processes when the user doesn't see the page or inversely to perform background actions.
151-
152149
## "Add to Calendar" button
153150

154151
Google Calendar, Apple Calendar, Yahoo Calender, Microsoft 365, Outlook, and Teams, and generate iCal/ics files (for all other calendars and cases).
@@ -160,83 +157,23 @@ Google Calendar, Apple Calendar, Yahoo Calender, Microsoft 365, Outlook, and T
160157

161158
Needs to add real API key and test
162159

163-
## SCSS Use clothoid corners with border-radius
164-
165-
`https://onotakehiko.dev/clothoid/`
166-
167-
`SCSS Make sure accent-color or styling for checkboxes/radio button groups is set up. Sets the colour used by checkboxes and radio buttons, as well as range fields and progress indicators. The accent colour is inherited`
168-
169-
```scss
170-
:root{
171-
accent-color : #696;
172-
}
173-
```
174-
175-
## Refactor modals
176-
177-
Modals should be wrapped in the `<dialog>` element and use programmatic methods to display - `showModal()` to disable the area outside of the modal (handles `esc` keypress natively) and `show()` to allow interaction outside the modal, along with `close()`.
178-
179-
## Add for iOS
180-
181-
Specifying a Launch Screen Image
182-
183-
On iOS, similar to native applications, you can specify a launch screen image that is displayed while your web application launches. This is especially useful when your web application is offline. By default, a screenshot of the web application the last time it was launched is used. To set another startup image, add a link element to the webpage, as in:
184-
185-
```html
186-
<link rel="apple-touch-startup-image" href="/launch.png">
187-
```
188-
189-
# Astro 3rd-Party Integrations, Eleventy Migration
190-
191-
## Eleventy plugins that don't yet have identified equivalents for Astro.
192-
193-
- **`eleventy-plugin-inclusive-language`**
194-
195-
## Outputs command line warnings for weasel words like "obviously", "basically", etc.
160+
## Astro 3rd-Party Integrations, Eleventy Migration
196161

197162
- **`eleventy-plugin-external-links`**
198163

199-
## Adds `target="_blank" rel="noreferrer"` to all external links
164+
### Adds `target="_blank" rel="noreferrer"` to all external links
200165

201166
- **`eleventy-plugin-emoji`**
202167

203-
## Accessible emoji shortcode and filter. Usage:
204-
205-
```{% emoji "⚙️", "settings gear" %} or {{ "⚙️" | emoji: "settings gear" }}```
206-
207-
- **`eleventy-plugin-nesting-toc`**
208-
209-
## Generates a nested table of contents for use in an aside from page contents.
210-
211-
```typescript
212-
{
213-
/** Which heading tags are selected, where each headings must have an ID attribute */
214-
tags: ['h2', 'h3'],
215-
/**
216-
* Elements to ignore when constructing the label for every header. Useful for
217-
* ignoring permalinks. Must be selectors.
218-
*/
219-
ignoredElements: [], // default
220-
/** Element to put around the root `ol` */
221-
wrapper: 'nav', // default
222-
/** Class for the element around the root `ol` */
223-
wrapperClass: 'toc', // default
224-
/** Optional text to show in heading above the wrapper element */
225-
headingText: '', // default
226-
/** Heading tag when showing heading above the wrapper element */
227-
headingTag: 'h2', // default
228-
}
229-
```
230-
231-
## Time to Read
168+
### Time to Read
232169

233170
Adds filter for analyzing content input into the filter and returning a time-to-read estimate to use in text like 'This will take 3 minutes to read'.
234171

235172
```typescript
236173
{
237174
speed: '200 words per minute',
238175
/** 'long': 3 minutes and 10 seconds, 'short': 3 min & 10 sec, 'narrow': 3m, 10s */
239-
style: 'narrow',
176+
style: 'narrow',src/layouts/BaseLayout.astro
240177
/** Which time units to render */
241178
hours: false,
242179
minutes: true,
@@ -257,15 +194,15 @@ Adds filter for analyzing content input into the filter and returning a time-to-
257194

258195
[`astro-emoji`](https://github.com/seanmcp/astro-emoji#astro-emoji)
259196

260-
## Table of Contents (ToC) generator
197+
### Table of Contents (ToC) generator
261198

262199
[`astro-toc`](https://github.com/theisel/astro-toc#readme)
263200

264-
## Astro wrapper for the `@github/clipboard-copy-element` web component. Copies element text content or input values to the clipboard
201+
### Astro wrapper for the `@github/clipboard-copy-element` web component. Copies element text content or input values to the clipboard
265202

266203
[`clipboard-copy`](https://github.com/BryceRussell/astro-github-elements/tree/main/packages/clipboard-copy#astro-github-elementsclipboard-copy)
267204

268-
## Astro wrapper for GitHub's relative time web component. Translates dates to past or future time phrases, like "*4 hours from now*" or "*20 days ago*"
205+
### Astro wrapper for GitHub's relative time web component. Translates dates to past or future time phrases, like "*4 hours from now*" or "*20 days ago*"
269206

270207
[Relative Time](https://github.com/BryceRussell/astro-github-elements/tree/main/packages/time#readme)
271208

astro.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const standardIntegrations = [
7373
})] : []),
7474
sitemap({
7575
serialize: createSerializeFunction({
76-
exclude: ['downloads', 'social-shares', '/articles/demo', 'testing'],
76+
exclude: ['downloads', '/articles/demo', 'testing'],
7777
}),
7878
}),
7979
/** Validate links in built site output on astro:build:done integration hook */

0 commit comments

Comments
 (0)