dequelabs / axe-core

Accessibility engine for automated Web UI testing
https://www.deque.com/axe/
Mozilla Public License 2.0
5.95k stars 775 forks source link

New Rule: filename is valid accessible name #1504

Closed jeeyyy closed 2 years ago

jeeyyy commented 5 years ago

filename-is-valid-accessible-name

This rule checks that image elements that use their source filename as their accessible name do so without loss of information to the user.

Tags

Matches

Checks

all:

References:

dylanb commented 5 years ago

I suggest that we close this because axe-core does not and cannot infer accurate meaning at this point in time i.e. this rule proposal is out of scope for axe-core

jeeyyy commented 5 years ago

@dylanb, we intend to only return incomplete on this rule and not a failure. Perhaps can mark this rule as experimental too.

dylanb commented 5 years ago

ok, I am worried about noise

jeeyyy commented 5 years ago

Test cases (WIP)

<!-- Pass 1, accessible name, uses filename -->
<img src="https://www.w3.org/WAI/demos/bad/img/w3c" alt="w3c" />

<!-- Pass 2, accessible name, uses filename (along with extension) -->
<img src="https://www.w3.org/WAI/demos/bad/img/w3c.png" alt="Download w3c.png"
/>

<!-- Incomplete 1, accessible name matches file name, but presence of extension in accessible name results in accesible name not describing the image accurately -->
<img src="https://www.w3.org/WAI/demos/bad/img/w3c.png" alt="w3c.png" />

<!-- Incomplete 2, same as above, but different element type -->
<input type="image" src="https://www.w3.org/WAI/demos/bad/before/img/top_weather.gif" alt="top_weather.gif" />

<!-- Inapplicable 1 -->
<img role="presentation" />

<!-- Inapplicable 2 -->
<img style="display:none;" />
WilcoFiers commented 2 years ago

Closing this. ACT has deprecated this rule.