@aurodesignsystem-dev/auro-hyperlink 0.0.0-pr322.1 → 0.0.0-pr328.0
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/README.md +12 -3
- package/custom-elements.json +64 -1799
- package/demo/a11y.html +3 -3
- package/demo/a11y.md +11 -9
- package/demo/api.html +2 -2
- package/demo/api.js +2 -1
- package/demo/api.md +311 -168
- package/demo/api.min.js +14 -1
- package/demo/auro-hyperlink.min.js +64 -52
- package/demo/index.html +2 -2
- package/demo/index.js +0 -2
- package/demo/index.md +23 -259
- package/demo/index.min.js +0 -31
- package/dist/{auro-hyperlink-isNf5eLk.js → auro-hyperlink-SowfvvPT.js} +4 -4
- package/dist/index.d.ts +227 -124
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +9 -5
package/demo/a11y.html
CHANGED
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
<script type="module" src="./index.min.js"></script>
|
|
52
52
|
|
|
53
53
|
<!-- If additional elements are needed for the demo, add them here. -->
|
|
54
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest
|
|
55
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest
|
|
56
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
|
|
56
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/+esm" type="module"></script>
|
|
57
57
|
</body>
|
|
58
58
|
</html>
|
package/demo/a11y.md
CHANGED
|
@@ -55,7 +55,7 @@ Reference [Accessibility Techniques for Links](https://dequeuniversity.com/check
|
|
|
55
55
|
</tr>
|
|
56
56
|
<tr>
|
|
57
57
|
<td>Links to external sites</td>
|
|
58
|
-
<td>A link to an external site
|
|
58
|
+
<td>A link to an external site SHOULD indicate that it leads to an external site.</td>
|
|
59
59
|
<td>Best practice</td>
|
|
60
60
|
<td><auro-hyperlink href="https://webaim.org/techniques/hypertext/link_text" target="_blank" type="nav">Web AIM Links and Hypertext</auro-hyperlink></td>
|
|
61
61
|
</tr>
|
|
@@ -69,7 +69,7 @@ Reference [Accessibility Techniques for Links](https://dequeuniversity.com/check
|
|
|
69
69
|
<td>Avoid "link" (or similar) in the link text</td>
|
|
70
70
|
<td>The link text SHOULD NOT state its semantic role (e.g. don't say "link to..."), because screen readers already state the role before reading the link text.</td>
|
|
71
71
|
<td>Best practice</td>
|
|
72
|
-
<td
|
|
72
|
+
<td><b>DO NOT DO THIS:</b><br>See the link for <auro-hyperlink href="https://www.alaskaair.com/en/flights-to-mexico">low-fare flights</auro-hyperlink> with Alaska.</td>
|
|
73
73
|
</tr>
|
|
74
74
|
</tbody>
|
|
75
75
|
</table>
|
|
@@ -103,10 +103,10 @@ Reference [Accessibility Techniques for Links](https://dequeuniversity.com/check
|
|
|
103
103
|
|
|
104
104
|
#### Focus Order
|
|
105
105
|
|
|
106
|
-
| Topic | Description | Requirement |
|
|
107
|
-
|
|
108
|
-
|Focus order|The navigation order of focusable elements (links, form elements, etc.) MUST be logical and intuitive.|WCAG 2.4.3
|
|
109
|
-
|Tabindex|The tabindex attribute SHOULD NOT be used with positive values to customize the tab order (e.g. don't use `tabindex="1"`).|Best practice
|
|
106
|
+
| Topic | Description | Requirement |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
|Focus order|The navigation order of focusable elements (links, form elements, etc.) MUST be logical and intuitive.|WCAG 2.4.3|
|
|
109
|
+
|Tabindex|The tabindex attribute SHOULD NOT be used with positive values to customize the tab order (e.g. don't use `tabindex="1"`).|Best practice|
|
|
110
110
|
|
|
111
111
|
#### Link Colors, Contrast, and Styles
|
|
112
112
|
|
|
@@ -121,13 +121,15 @@ Reference [Accessibility Techniques for Links](https://dequeuniversity.com/check
|
|
|
121
121
|
</thead>
|
|
122
122
|
<tbody>
|
|
123
123
|
<tr>
|
|
124
|
-
<td>
|
|
124
|
+
<td>Visually distinguishable</td>
|
|
125
125
|
<td>Links MUST be visually distinguishable from surrounding non-link text.</td>
|
|
126
126
|
<td>WCAG 1.4.1</td><td>Find <auro-hyperlink href="https://www.alaskaair.com/en/flights-to-mexico">low-fare flights to Mexico</auro-hyperlink> on Alaska Airlines.</td>
|
|
127
127
|
</tr>
|
|
128
128
|
<tr>
|
|
129
|
-
<td>
|
|
130
|
-
<td>
|
|
129
|
+
<td>Using color to distinguish links</td>
|
|
130
|
+
<td>
|
|
131
|
+
Color MUST NOT be the only method used to distinguish links from surrounding text, <strong>unless the color contrast between the link and adjacent text is at least 3:1 and an additional visual indicator (such as an underline or outline) is provided on hover and focus.</strong><br><br> See <auro-hyperlink href="https://webaim.org/resources/contrastchecker/?fcolor=0074CB&bcolor=222222" target="_blank">color contrast test</auro-hyperlink>.
|
|
132
|
+
</td>
|
|
131
133
|
<td>WCAG 1.4.1</td>
|
|
132
134
|
<td><auro-hyperlink type="nav" href="https://www.alaskaair.com/en/flights-to-mexico">Find low-fare flights to Mexico</auro-hyperlink></td>
|
|
133
135
|
</tr>
|
package/demo/api.html
CHANGED
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
<script defer type="module" src="./api.min.js"></script>
|
|
52
52
|
|
|
53
53
|
<!-- If additional elements are needed for the demo, add them here. -->
|
|
54
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest
|
|
55
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-icon@latest/+esm" type="module"></script>
|
|
56
56
|
</body>
|
|
57
57
|
</html>
|
package/demo/api.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AuroHyperlink } from "../src/index";
|
|
2
|
+
import { roleButtonExample } from "../apiExamples/role-button";
|
|
2
3
|
|
|
3
4
|
AuroHyperlink.register();
|
|
4
5
|
|
|
@@ -7,7 +8,7 @@ function initHyperlinkApiExamples(initCount) {
|
|
|
7
8
|
initCount = initCount || 0;
|
|
8
9
|
|
|
9
10
|
try {
|
|
10
|
-
|
|
11
|
+
roleButtonExample();
|
|
11
12
|
} catch {
|
|
12
13
|
if (initCount <= 20) {
|
|
13
14
|
// setTimeout handles issue where content is sometimes loaded after the functions get called
|