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

Accessibility Issue : Neutral markup is used where purpose-specific semantic markup is available #771

Open
Developer-BHN opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Developer-BHN
Copy link

Description
Content has neutral markup plus styling to convey presentation that is not semantically described.

Information, structure, and relationships conveyed through presentation must be able to be programmatically determined. Using semantic markup for its intended purpose allows user agents including assistive technology to present content both visually and in alternative formats. Using neutral markup to control visual presentation may not allow assistive technology to correctly convey the intended effect. For example, using uppercase to emphasize text may mean a screen reader announces each letter, where using <em> produces a visual emphasis and is correctly announced.

Issue Code

<uc-source-list wrap="">
  <uc-source-btn type="local">
    <button type="button">
      <uc-icon name="local">
        <svg xmlns="http://www.w3.org/2000/svg">
          <title></title>
          <use href="#uc-icon-local"></use>
        </svg>
      </uc-icon>
      <div class="uc-txt">From device</div>
    </button>
  </uc-source-btn>
  <uc-source-btn type="camera">
    <button type="button">
      <uc-icon name="camera">
        <svg xmlns="http://www.w3.org/2000/svg">
          <title></title>
          <use href="#uc-icon-camera"></use>
        </svg>
      </uc-icon>
      <div class="uc-txt">Camera</div>
    </button>
  </uc-source-btn>
  <uc-source-btn type="gphotos">
    <button type="button">
      <uc-icon name="gphotos">
        <svg xmlns="http://www.w3.org/2000/svg">
          <title></title>
          <use href="#uc-icon-gphotos"></use>
        </svg>
      </uc-icon>
      <div class="uc-txt">Google Photos</div>
    </button>
  </uc-source-btn>
  <uc-source-btn type="facebook">
    <button type="button">
      <uc-icon name="facebook">
        <svg xmlns="http://www.w3.org/2000/svg">
          <title></title>
          <use href="#uc-icon-facebook"></use>
        </svg>
      </uc-icon>
      <div class="uc-txt">Facebook</div>
    </button>
  </uc-source-btn><uc-source-btn type="instagram">
    <button type="button">
      <uc-icon name="instagram">
        <svg xmlns="http://www.w3.org/2000/svg">
          <title></title>
          <use href="#uc-icon-instagram"></use>
        </svg>
      </uc-icon>
      <div class="uc-txt">Instagram</div>
    </button>
  </uc-source-btn>
  <uc-source-btn type="gdrive">
    <button type="button">
      <uc-icon name="gdrive">
        <svg xmlns="http://www.w3.org/2000/svg">
          <title></title>
          <use href="#uc-icon-gdrive"></use>
        </svg>
      </uc-icon>
      <div class="uc-txt">Google Drive</div>
    </button>
  </uc-source-btn>
  <uc-source-btn type="dropbox">
    <button type="button">
      <uc-icon name="dropbox">
        <svg xmlns="http://www.w3.org/2000/svg">
          <title></title>
          <use href="#uc-icon-dropbox"></use>
        </svg>
      </uc-icon>
      <div class="uc-txt">Dropbox</div>
    </button>
  </uc-source-btn><uc-source-btn type="flickr">
    <button type="button">
      <uc-icon name="flickr">
        <svg xmlns="http://www.w3.org/2000/svg">
          <title></title>
          <use href="#uc-icon-flickr"></use>
        </svg>
      </uc-icon>
      <div class="uc-txt">Flickr</div>
    </button>
  </uc-source-btn>
</uc-source-list>

Recommended Code

<uc-source-list wrap="">
  <ul role="list">
    <li>
      <uc-source-btn type="local">
        <button type="button">
          <uc-icon name="local" aria-hidden="true">
            <svg xmlns="http://www.w3.org/2000/svg">
              <title></title>
              <use href="#uc-icon-local"></use>
            </svg>
          </uc-icon>
          <div class="uc-txt">From device</div>
        </button>
      </uc-source-btn>
    </li>
    <li>
      <uc-source-btn type="camera">
        <button type="button">
          <uc-icon name="camera" aria-hidden="true">
            <svg xmlns="http://www.w3.org/2000/svg">
              <title></title>
              <use href="#uc-icon-camera"></use>
            </svg>
          </uc-icon>
          <div class="uc-txt">Camera</div>
        </button>
      </uc-source-btn>
    </li>
    <li>
      <uc-source-btn type="gphotos">
        <button type="button">
          <uc-icon name="gphotos" aria-hidden="true">
            <svg xmlns="http://www.w3.org/2000/svg">
              <title></title>
              <use href="#uc-icon-gphotos"></use>
            </svg>
          </uc-icon>
          <div class="uc-txt">Google Photos</div>
        </button>
      </uc-source-btn>
    </li>
    <li>
      <uc-source-btn type="facebook">
        <button type="button">
          <uc-icon name="facebook" aria-hidden="true">
            <svg xmlns="http://www.w3.org/2000/svg">
              <title></title>
              <use href="#uc-icon-facebook"></use>
            </svg>
          </uc-icon>
          <div class="uc-txt">Facebook</div>
        </button>
      </uc-source-btn>
    </li>
    <li>
      <uc-source-btn type="instagram">
        <button type="button">
          <uc-icon name="instagram" aria-hidden="true">
            <svg xmlns="http://www.w3.org/2000/svg">
              <title></title>
              <use href="#uc-icon-instagram"></use>
            </svg>
          </uc-icon>
          <div class="uc-txt">Instagram</div>
        </button>
      </uc-source-btn>
    </li>
    <li>
      <uc-source-btn type="gdrive">
        <button type="button">
          <uc-icon name="gdrive" aria-hidden="true">
            <svg xmlns="http://www.w3.org/2000/svg">
              <title></title>
              <use href="#uc-icon-gdrive"></use>
            </svg>
          </uc-icon>
          <div class="uc-txt">Google Drive</div>
        </button>
      </uc-source-btn>
    </li>
    <li>
      <uc-source-btn type="dropbox">
        <button type="button">
          <uc-icon name="dropbox" aria-hidden="true">
            <svg xmlns="http://www.w3.org/2000/svg">
              <title></title>
              <use href="#uc-icon-dropbox"></use>
            </svg>
          </uc-icon>
          <div class="uc-txt">Dropbox</div>
        </button>
      </uc-source-btn>
    </li>
    <li>
      <uc-source-btn type="flickr">
        <button type="button">
          <uc-icon name="flickr" aria-hidden="true">
            <svg xmlns="http://www.w3.org/2000/svg">
              <title></title>
              <use href="#uc-icon-flickr"></use>
            </svg>
          </uc-icon>
          <div class="uc-txt">Flickr</div>
        </button>
      </uc-source-btn>
    </li>
  </ul>
</uc-source-list>

Screenshots
DE33185

Issue Metadata
Applicable Standards:

1.3.1 Info and Relationships (Level A)

Content Type:

error

Impacted Populations

Blind (Severity: 2)Low Vision (Severity: 2)Cognitively Impaired (Severity: 2)

Issue Key:

56

@egordidenko
Copy link
Contributor

Hi @Developer-BHN,

Thank you so much for diving deep into the accessibility aspects of File Uploader. We truly appreciate your contribution, as we strive to make our product accessible and user-friendly for everyone.

You’re absolutely right—improving semantics will help assistive technologies interpret the structure correctly. In this case, instead of using <ul>/<li>, we plan to add role="list" to <uc-source-list> and role="listitem" to <uc-source-btn>. This approach allows us to maintain the flexibility of our markup without altering its visual or functional behavior while ensuring proper list recognition by assistive technologies.

We’ll be working on a PR to implement these changes soon.

Thanks again for your valuable input! 😊

@egordidenko egordidenko self-assigned this Jan 31, 2025
@egordidenko egordidenko added the enhancement New feature or request label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants