-
Notifications
You must be signed in to change notification settings - Fork 27
/
attrs.go
186 lines (156 loc) · 4.51 KB
/
attrs.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
package attrs
const (
// Universal Attributes
Alt = "alt"
Class = "class"
Contenteditable = "contenteditable"
Dir = "dir" // Direction, e.g., "ltr" or "rtl"
ID = "id"
Lang = "lang"
Style = "style"
Tabindex = "tabindex"
Title = "title"
Loading = "loading"
// Link/Script Attributes
As = "as"
Async = "async"
// Deprecated: Use Crossorigin instead
CrossOrigin = "crossorigin"
Crossorigin = "crossorigin"
Defer = "defer"
Href = "href"
Integrity = "integrity"
Nomodule = "nomodule"
Rel = "rel"
Src = "src"
Target = "target"
// Meta Attributes
Charset = "charset"
Content = "content"
HTTPequiv = "http-equiv" // e.g., for refresh or setting content type
// Image/Embed Attributes
Height = "height"
Width = "width"
// Deprecated: Use Ismap instead
IsMap = "ismap"
Ismap = "ismap"
Usemap = "usemap"
// Semantic Text Attributes
Cite = "cite"
// Deprecated: Use Datetime instead
DateTime = "datetime"
Datetime = "datetime"
// Form/Input Attributes
Accept = "accept"
Action = "action"
Autocapitalize = "autocapitalize"
Autocomplete = "autocomplete"
Autofocus = "autofocus"
Cols = "cols"
Checked = "checked"
Disabled = "disabled"
For = "for"
Form = "form"
Label = "label"
List = "list"
Low = "low"
High = "high"
Max = "max"
// Deprecated: Use Maxlength instead
MaxLength = "maxlength"
Maxlength = "maxlength"
Method = "method" // e.g., "GET", "POST"
Min = "min"
Minlength = "minlength"
Multiple = "multiple"
Name = "name"
// Deprecated: Use Novalidate instead
NoValidate = "novalidate"
Novalidate = "novalidate"
Optimum = "optimum"
Placeholder = "placeholder"
Readonly = "readonly"
Required = "required"
Rows = "rows"
Selected = "selected"
Size = "size"
Step = "step"
Type = "type"
Value = "value"
// Interactive Attributes
Open = "open"
// Area-Specific Attributes
Shape = "shape"
Coords = "coords"
// Miscellaneous Attributes
DataPrefix = "data-" // Used for custom data attributes e.g., "data-custom"
Download = "download"
Draggable = "draggable"
Role = "role" // Used for ARIA roles
Spellcheck = "spellcheck"
// Table Attributes
RowSpan = "rowspan"
ColSpan = "colspan"
Scope = "scope"
Headers = "headers"
// IFrame Attributes
Allow = "allow"
// Deprecated: Use AllowFullscreen instead
AllowFullScreen = "allowfullscreen"
AllowFullscreen = "allowfullscreen"
CSP = "csp"
// Deprecated: Use Referrerpolicy instead
ReferrerPolicy = "referrerpolicy"
Referrerpolicy = "referrerpolicy"
Sandbox = "sandbox"
// Deprecated: Use Srcdoc instead
SrcDoc = "srcdoc"
Srcdoc = "srcdoc"
// Audio/Video Attributes
Controls = "controls"
Loop = "loop"
Muted = "muted"
Preload = "preload"
Autoplay = "autoplay"
// Video-Specific Attributes
Poster = "poster"
Playsinline = "playsinline"
// Source Element-Specific Attributes
Media = "media"
Sizes = "sizes"
// ARIA Attributes
AriaActivedescendant = "aria-activedescendant"
AriaAtomic = "aria-atomic"
AriaAutocomplete = "aria-autocomplete"
AriaBusy = "aria-busy"
AriaChecked = "aria-checked"
AriaControls = "aria-controls"
AriaDescribedby = "aria-describedby"
AriaDisabled = "aria-disabled"
AriaExpanded = "aria-expanded"
AriaFlowto = "aria-flowto"
AriaHaspopup = "aria-haspopup"
AriaHidden = "aria-hidden"
AriaInvalid = "aria-invalid"
AriaLabel = "aria-label"
AriaLabelledby = "aria-labelledby"
AriaLevel = "aria-level"
AriaLive = "aria-live"
AriaModal = "aria-modal"
AriaMultiline = "aria-multiline"
AriaMultiselectable = "aria-multiselectable"
AriaOrientation = "aria-orientation"
AriaOwns = "aria-owns"
AriaPlaceholder = "aria-placeholder"
AriaPressed = "aria-pressed"
AriaReadonly = "aria-readonly"
AriaRequired = "aria-required"
AriaRoledescription = "aria-roledescription"
AriaSelected = "aria-selected"
AriaSort = "aria-sort"
AriaValuemax = "aria-valuemax"
AriaValuemin = "aria-valuemin"
AriaValuenow = "aria-valuenow"
AriaValuetext = "aria-valuetext"
)
type Props map[string]string