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

Examples from Storybook are incorrect and not accessabilty conform #879

Closed
christophstockinger opened this issue Feb 20, 2022 · 3 comments
Closed
Labels
accessibility Related to accessibility

Comments

@christophstockinger
Copy link

Ich habe gesucht, wie ich das mobile Menü von außern steuern kann, dabei habe ich mir mal den Output aus dem Storybook-Beispiel kopiert. Dabei habe ich nachfolgendem Code bekommen.

Auf den ersten Blick finde ich es erschreckend wie Tags gewrappt werden. Vorallem wenn man betrachtet, dass mit Accessible AA wirbt.

<div class="main-navigation-mobile">
  <ul class="main-navigation-mobile__main-menu">
    <a aria-current="true" aria-haspopup="true" class="main-navigation-mobile__item-link main-navigation-mobile__item-link--selected" href="javascript:void(0);" tabindex="0">
      <li class="main-navigation-mobile__item"><div class="main-navigation-mobile__item-wrapper">
        <span>Topic One</span>
        <span class="sr-only">active</span>
        <scale-icon-navigation-right size="24" class="hydrated" style="display: inline-flex;">
          <svg class="scale-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
            <g fill="currentColor"><g>
              <path d="M7.4 19.95c-.25-.35-.2-.8.1-1.05l8.8-6.9-8.75-6.9a.691.691 0 01-.1-1.05c.25-.3.75-.4 1.05-.1L18.7 12 8.45 20.1c-.3.25-.8.2-1.05-.15z" fill-rule="evenodd"></path>
            </g>
          </g>
        </svg>
          </scale-icon-navigation-right>
        </div>
      </li>
    </a>
    <!-- more -->
  </ul>
</div>
@nowseemee
Copy link
Collaborator

Hi @christophstockinger, thanks for your comment. The AA Accessibility compliant components in our Storybook have been audited by an external team responsible for this. If you have suggestions to further improve the quality then please don't hesitate to open a PR, we will be happy to review. Thanks!

@acstll
Copy link
Collaborator

acstll commented Mar 30, 2022

Thanks again @christophstockinger.

In the snippet I notice that having an a tag be a direct child of ul should be invalid HTML, so this looks indeed like a mistake. Is that what you mean by "incorrect" in the issue title? or is it something else?

Auf den ersten Blick finde ich es erschreckend wie Tags gewrappt werden.

is this also related to the ul > a issue or you meant something else?

@acstll acstll added the accessibility Related to accessibility label Mar 30, 2022
@christophstockinger
Copy link
Author

Both times yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Related to accessibility
Projects
None yet
Development

No branches or pull requests

4 participants