Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive for rule element_orientation_unlocked #2131

Open
8 tasks
scottaohara opened this issue Dec 13, 2024 · 2 comments
Open
8 tasks

False positive for rule element_orientation_unlocked #2131

scottaohara opened this issue Dec 13, 2024 · 2 comments
Labels
engine Issues in the accessibility-checker-engine component false-positive Rules incorrectly reporting a violation user-reported Issues identified outside of the core team

Comments

@scottaohara
Copy link

Describe the bug
Using my own website as a means to quickly test a pattern, I got an unexpected violation from the checker.
It seems that an element used purely for decoration is being flagged as a violation under the element_orientation_unlocked rule. This seems unnecessarily strict.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.scottohara.me/
  2. Run the ITM Accessibility Assessment plugin
  3. See 1 violation in the returned results

Expected behavior
I wouldn't expect any error to be flagged here at all, since the element that it's highlighting is an empty generic div that is merely a decorative flourish to my page header area, which i've also set to aria-hidden=true (which is rather unnecessary tbh - but just done in the off chance a screen reader wouldn't immediately move pass this 'blank' area)

Screenshots
screenshot of the top portion of scott ohara's web page. the offending element has been highlighted in red, and the browser dev tools are shown, highlighting the element as well
To call this out, i've modified the style of this element to be red (adjusting the ::after pseudo element's background color - not pictured in the screenshot).

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome/Edge
  • Version latest

Additional context
While I think the intent of this check is good, it seems its overly strict if it's calling out decorative items such as this as being "violations".

Per the rational I can gather from the learn more doc on this:

When the CSS transform property is used, ensure the transform function is conditionally applied to the orientation of the media feature so that it does not restrict the page or element to either portrait or landscape orientation

i'd suggest that more nuance is needed, as while i can understand the intent behind this (prevent door-slam scenarios), this isn't anywhere close to what's happening on my site w/this decorative div.

Thanks!

Definition of Done

  • Design artifacts reviewed
  • Work item implemented
  • Automated test case created (when applicable)
  • Unit test completed
  • Run Checker (when applicable)
  • Manual and Screen Reader Testing (when applicable)
  • Video recording of user experience walkthrough (if impact to UX)
  • PR created
@tombrunet
Copy link
Member

Just to see if we're on the same page - yes, the orientation of that element is locked, but since there is no visual content in that element, the orientation of the element is immaterial, so wouldn't be a WCAG violation. I agree with that. But, I can think of a few scenarios here that I'd like your thoughts on:

  • Element has visible text (I think we can agree this should be a violation)
  • Element has an image that has alt text (I think this would also be a violation)
  • Element has an image that is alt="" or aria-hidden="true" (This feels like it may be "Needs review" - would it matter if a purely decorative element is the wrong orientation?)
  • Element has no content, but might have color (I think we can safely ignore this)

@scottaohara
Copy link
Author

the orientation of the element on my page isn't technically "locked" though. that's part of the problem / why i'm concerned this check is being overly strict. if you look at my page on a portrait ipad, for instance, the element shows up. The rendering of the element is dependent on the viewport width - not the orientation.

@MHoov MHoov added false-positive Rules incorrectly reporting a violation user-reported Issues identified outside of the core team engine Issues in the accessibility-checker-engine component labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issues in the accessibility-checker-engine component false-positive Rules incorrectly reporting a violation user-reported Issues identified outside of the core team
Projects
None yet
Development

No branches or pull requests

3 participants