-
Notifications
You must be signed in to change notification settings - Fork 0
/
aria_live_region_attributes.go
59 lines (46 loc) · 1.53 KB
/
aria_live_region_attributes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package gomplements
import "maragu.dev/gomponents"
type ariaBusy string
// aria-busy attribute
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-busy
const (
AriaBusyTrue ariaBusy = "true"
AriaBusyFalse ariaBusy = "false"
)
func (a ariaBusy) ModifyParent(p Element) {
p.With(gomponents.Attr("aria-busy", string(a)))
}
type ariaLive string
// aria-live attribute
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live
const (
AriaLiveOff ariaLive = "off"
AriaLiveAssertive ariaLive = "assertive"
AriaLivePolite ariaLive = "polite"
)
func (a ariaLive) ModifyParent(p Element) {
p.With(gomponents.Attr("aria-live", string(a)))
}
type ariaRelevant string
// aria-relevant attribute
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-relevant
const (
AriaRelevantAdditions ariaRelevant = "additions"
AriaRelevantAll ariaRelevant = "all"
AriaRelevantRemovals ariaRelevant = "removals"
AriaRelevantText ariaRelevant = "text"
AriaRelevantAdditionsText ariaRelevant = "additions text"
)
func (a ariaRelevant) ModifyParent(p Element) {
p.With(gomponents.Attr("aria-relevant", string(a)))
}
type ariaAtomic string
// aria-atomic attribute
// https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-atomic
const (
AriaAtomicTrue ariaAtomic = "true"
AriaAtomicFalse ariaAtomic = "false"
)
func (a ariaAtomic) ModifyParent(p Element) {
p.With(gomponents.Attr("aria-atomic", string(a)))
}