@punica/components-mcp 0.1.0 → 0.1.1
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/dist/bundled.json +1 -1
- package/dist/guide.md +13 -0
- package/package.json +1 -1
package/dist/bundled.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2.1.
|
|
1
|
+
{"version":"2.1.1"}
|
package/dist/guide.md
CHANGED
|
@@ -97,6 +97,19 @@ properties. Right-to-left works with `dir="rtl"` on any ancestor.
|
|
|
97
97
|
elements (`compilerOptions.isCustomElement`).
|
|
98
98
|
- **Angular**: `CUSTOM_ELEMENTS_SCHEMA`, `(punica-change)="…"`, `[value]="…"`.
|
|
99
99
|
|
|
100
|
+
## Testing
|
|
101
|
+
|
|
102
|
+
Elements carry their role through `ElementInternals`: a `punica-heading` is
|
|
103
|
+
a heading and a `punica-table-row` a row to a screen reader, with no `role`
|
|
104
|
+
attribute in the markup. Tools that read the markup instead of the
|
|
105
|
+
accessibility tree do not see those roles yet: Playwright's `getByRole`,
|
|
106
|
+
Testing Library's `getByRole`, and rules of axe-core such as
|
|
107
|
+
`page-has-heading-one`. In tests, find such an element by its tag
|
|
108
|
+
(`page.locator('punica-table-row')`); for the one heading of a page that an
|
|
109
|
+
audit has to find, use a native `<h1>`. Roles of native elements inside an
|
|
110
|
+
element (the `button` in a `punica-button`, the `dialog` in a
|
|
111
|
+
`punica-alert-dialog`) are found as usual.
|
|
112
|
+
|
|
100
113
|
## Check your work
|
|
101
114
|
|
|
102
115
|
`npx punica-components validate <files>` checks tags, attributes, values,
|