Skip to content

Commit 0541ac8

Browse files
committed
chore: pico specs, add aria attributes
1 parent 57ad9f8 commit 0541ac8

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

scss/inline/_label.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
* Found in scss/components/_nav.scss#83: `&[aria-label="breadcrumb"] {`
77
* Found in scss/components/_nav.scss#149: `&[aria-label="breadcrumb"] {`
88
* Found in scss/forms/_basics.scss#136: `#{\$parent-selector} label,`
9-
* Found in scss/forms/_basics.scss#141: `font-weight: var(#{\$css-var-prefix}form-label-font-weight, var(#{\$css-var-prefix}font-weight));`
109
* Found in scss/forms/_basics.scss#241: `#{\$parent-selector} label[aria-disabled="true"],`
1110
* Found in scss/forms/_basics.scss#249: `#{\$parent-selector} label[aria-disabled="true"] input[disabled] {`
12-
* Found in scss/forms/_basics.scss#465: `// Styles for Input inside a label`
1311
* Found in scss/forms/_basics.scss#466: `#{\$parent-selector} label {`
1412
* Found in scss/forms/_checkbox-radio-switch.scss#11: `#{\$parent-selector} label {`
1513
* Found in scss/forms/_checkbox-radio-switch.scss#46: `& ~ label {`

src/Resources/picocss.yaml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,22 @@ input:
5454
type: enum|string
5555
choices:
5656
- search
57-
a:
57+
58+
# aria current for navigational and interactive elements (opinionated - Pico only uses true/false)
59+
'/^(a|button|li|nav|input)$/':
5860
attributes:
5961
aria-current:
60-
description: 'The aria-current attribute is used to define the current item in a set of related elements.'
62+
description: 'Indicates the current item within a container or set of related elements.'
6163
type: enum|string
64+
defaultValue: 'false'
6265
choices:
63-
- page
66+
- 'false'
67+
- 'page'
68+
- 'step'
69+
- 'location'
70+
- 'date'
71+
- 'time'
72+
- 'true'
6473

6574
# all non-void elements, except form and html
6675
'/^(?!area|base|body|br|col|embed|head|hr|img|input|link|meta|meter|noscript|output|param|progress|script|source|track|wbr|script|select|style|textarea|title|html|form$)[a-z][a-z0-9]*$/':
@@ -72,4 +81,23 @@ a:
7281
choices:
7382
- 'true'
7483
- 'false'
75-
# @todo aria-busy, aria-controls, aria-invalid, aria-current, aria-label, aria-disabled, aria-hidden
84+
85+
# all non-void elements, especially interactive elements
86+
'/^(?!area|base|body|br|col|embed|head|hr|img|link|meta|meter|noscript|output|param|progress|script|source|track|wbr|script|style|title|html|form$)[a-z][a-z0-9]*$/':
87+
attributes:
88+
aria-controls:
89+
description: 'Identifies the element(s) whose contents or presence are controlled by this element. Value is a list of IDs separated by a space'
90+
type: string
91+
92+
'/^(input|select|textarea|fieldset|form)$/':
93+
attributes:
94+
aria-invalid:
95+
description: 'Indicates that the value entered does not conform to the expected format.'
96+
type: enum|string
97+
defaultValue: 'false'
98+
choices:
99+
- 'false'
100+
- 'true'
101+
- 'grammar'
102+
- 'spelling'
103+
# @todo aria-current, aria-label, aria-disabled, aria-hidden

0 commit comments

Comments
 (0)