You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[fix] Fix rule details for img-uses-alt: allow alt="" or role="presentation".
4
+
5
+
6
+
0.6.1 / 2016-04-07
7
+
==================
8
+
-[fix] Do not infer interactivity of components that are not low-level DOM elements.
9
+
10
+
11
+
0.6.0 / 2016-04-06
12
+
==================
13
+
-[breaking] Allow alt="" when role="presentation" on img-uses-alt rule.
14
+
-[new] More descriptive error messaging for img-uses-alt rule.
15
+
16
+
17
+
0.5.2 / 2016-04-05
18
+
==================
19
+
-[fix] Handle token lists for valid-aria-role.
20
+
21
+
22
+
0.5.1 / 2016-04-05
23
+
==================
24
+
-[fix] Handle null valued props for valid-aria-role.
25
+
26
+
27
+
0.5.0 / 2016-04-02
28
+
==================
29
+
-[new] Implement valid-aria-role rule. Based on [AX_ARIA_01](https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules#ax_aria_01)
30
+
31
+
32
+
0.4.3 / 2016-03-29
33
+
==================
34
+
-[fix] Handle LogicalExpression attribute types when extracting values. LogicalExpressions are of form `<Component prop={foo || "foobar"} />`
35
+
36
+
37
+
0.4.2 / 2016-03-24
38
+
==================
39
+
-[fix] Allow component names of form `Object.Property` i.e. `UX.Layout`
Copy file name to clipboardExpand all lines: docs/rules/img-uses-alt.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,15 +41,16 @@ To tell this plugin to also check your `Image` element, specify this in your `.e
41
41
}
42
42
```
43
43
44
-
Note that passing props as spread attribute without `alt` explicitly defined will cause this rule to fail. Explicitly pass down `alt` prop for rule to pass. The prop must have an actual value to pass. Use `Image` component above as a reference for destructuring and applying the prop. **It is a good thing to explicitly pass props that you expect to be passed for self-documentation.**
44
+
Note that passing props as spread attribute without `alt` explicitly defined will cause this rule to fail. Explicitly pass down `alt` prop or use `role="presentation"` for rule to pass. Use `Image` component above as a reference for destructuring and applying the prop. **It is a good thing to explicitly pass props that you expect to be passed for self-documentation.**
45
45
46
46
### Succeed
47
47
```jsx
48
48
<img src="foo" alt="Foo eating a sandwich."/>
49
49
<img src="foo" alt={"Foo eating a sandwich."} />
50
50
<img src="foo" alt={altText} />
51
51
<img src="foo" alt={`${person} smiling`} />
52
-
<img src="foo" alt="" role="presentation"/><!-- Alt text can be an empty string if`role="presentation"`-->
Copy file name to clipboardExpand all lines: docs/rules/valid-aria-role.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
Elements with ARIA roles must use a valid, non-abstract ARIA role. A reference to all role defintions can be found at [WAI-ARIA](https://www.w3.org/TR/wai-aria/roles#role_definitions) site.
0 commit comments