Skip to content

Commit 74a6330

Browse files
committed
Add test for aria-hidden
1 parent acdbf37 commit 74a6330

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

fixtures/attribute-behavior/AttributeTableSnapshot.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,31 @@
648648
| `aria-=(null)`| (initial, warning)| `<null>` |
649649
| `aria-=(undefined)`| (initial, warning)| `<null>` |
650650

651+
## `aria-hidden` (on `<div>` inside `<div>`)
652+
| Test Case | Flags | Result |
653+
| --- | --- | --- |
654+
| `aria-hidden=(string)`| (changed)| `"a string"` |
655+
| `aria-hidden=(empty string)`| (changed)| `<empty string>` |
656+
| `aria-hidden=(array with string)`| (changed)| `"string"` |
657+
| `aria-hidden=(empty array)`| (changed)| `<empty string>` |
658+
| `aria-hidden=(object)`| (changed)| `"result of toString()"` |
659+
| `aria-hidden=(numeric string)`| (changed)| `"42"` |
660+
| `aria-hidden=(-1)`| (changed)| `"-1"` |
661+
| `aria-hidden=(0)`| (changed)| `"0"` |
662+
| `aria-hidden=(integer)`| (changed)| `"1"` |
663+
| `aria-hidden=(NaN)`| (changed)| `"NaN"` |
664+
| `aria-hidden=(float)`| (changed)| `"99.99"` |
665+
| `aria-hidden=(true)`| (changed)| `"true"` |
666+
| `aria-hidden=(false)`| (changed)| `"false"` |
667+
| `aria-hidden=(string 'true')`| (changed)| `"true"` |
668+
| `aria-hidden=(string 'false')`| (changed)| `"false"` |
669+
| `aria-hidden=(string 'on')`| (changed)| `"on"` |
670+
| `aria-hidden=(string 'off')`| (changed)| `"off"` |
671+
| `aria-hidden=(symbol)`| (initial)| `<null>` |
672+
| `aria-hidden=(function)`| (initial)| `<null>` |
673+
| `aria-hidden=(null)`| (initial)| `<null>` |
674+
| `aria-hidden=(undefined)`| (initial)| `<null>` |
675+
651676
## `aria-invalidattribute` (on `<div>` inside `<div>`)
652677
| Test Case | Flags | Result |
653678
| --- | --- | --- |

fixtures/attribute-behavior/src/attributes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ const attributes = [
119119
},
120120
{name: 'aria', read: getAttribute('aria')},
121121
{name: 'aria-', read: getAttribute('aria-')},
122+
{name: 'aria-hidden', read: getProperty('ariaHidden')},
122123
{name: 'aria-invalidattribute', read: getAttribute('aria-invalidattribute')},
123124
{name: 'as', tagName: 'link'},
124125
{

0 commit comments

Comments
 (0)