|
1 | 1 | use phf::phf_set;
|
2 | 2 |
|
3 |
| -pub const GLOBAL_OBJECT_NAMES: phf::Set<&'static str> = phf_set! { |
4 |
| - "global", |
5 |
| - "globalThis", |
6 |
| - "self", |
7 |
| - "window", |
8 |
| -}; |
| 3 | +pub const GLOBAL_OBJECT_NAMES: [&str; 4] = ["global", "globalThis", "self", "window"]; |
| 4 | + |
| 5 | +/// set of reserved HTML tag names definition |
| 6 | +/// if it's not reserved, then it can have aria-* roles, states, and properties |
| 7 | +/// Reference: <https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_aria_12> |
| 8 | +/// Reference: <https://www.w3.org/TR/html-aria/#rules-wd> |
| 9 | +/// Reference: <https://github.com/A11yance/aria-query/blob/v5.3.2/src/domMap.js> |
| 10 | +pub const RESERVED_HTML_TAG: [&str; 16] = [ |
| 11 | + "base", "col", "colgroup", "head", "html", "link", "meta", "noembed", "noscript", "param", |
| 12 | + "picture", "script", "source", "style", "title", "track", |
| 13 | +]; |
9 | 14 |
|
10 | 15 | /// set of valid ARIA properties from the WAI-ARIA 1.1 specifications.
|
11 | 16 | /// Reference: <https://www.w3.org/TR/wai-aria/#state_prop_def>
|
@@ -342,27 +347,3 @@ pub const HTML_TAG: phf::Set<&'static str> = phf_set! {
|
342 | 347 | "wbr",
|
343 | 348 | "xmp",
|
344 | 349 | };
|
345 |
| - |
346 |
| -/// set of reserved HTML tag names definition |
347 |
| -/// if it's not reserved, then it can have aria-* roles, states, and properties |
348 |
| -/// Reference: <https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_aria_12> |
349 |
| -/// Reference: <https://www.w3.org/TR/html-aria/#rules-wd> |
350 |
| -/// Reference: <https://github.com/A11yance/aria-query/blob/v5.3.2/src/domMap.js> |
351 |
| -pub const RESERVED_HTML_TAG: phf::Set<&'static str> = phf_set! { |
352 |
| - "base", |
353 |
| - "col", |
354 |
| - "colgroup", |
355 |
| - "head", |
356 |
| - "html", |
357 |
| - "link", |
358 |
| - "meta", |
359 |
| - "noembed", |
360 |
| - "noscript", |
361 |
| - "param", |
362 |
| - "picture", |
363 |
| - "script", |
364 |
| - "source", |
365 |
| - "style", |
366 |
| - "title", |
367 |
| - "track", |
368 |
| -}; |
0 commit comments