• Resolved Adrian Roselli

    (@adrian-roselli)


    The URL I linked is supposed to be the demo site, but it is showing a configuration error. Which means I cannot confirm the ideal version of this control.

    However, wading into the issues I found two sites that have the toggle:

    https://www.sinhalamp3.cf/
    https://www.smartifyspaces.com/

    In both cases the code looks generally like this:

    
    <div class="wp-dark-mode-switcher" onclick="…">
     <label for="wp-dark-mode-switch" class="wp-dark-mode-ignore wp-dark-mode-none">
      <div></div>
      <div>
       <img class="light" src="…/sun.png" alt="Light">
       <img class="dark" src="…/moon.png" alt="Dark">
      </div>
     </label>
    </div>`
    

    That code:
    – has no native interactive control (like a <button);
    – has no control that can receive focus (WCAG SC 2.1.1 Keyboard), though you could fix that by using <button>;
    – incorrectly uses the <label> element (WCAG SC 1.3.3 Info and Relationships), which can be addressed by removing the <label>;
    – has not interactive role on the trigger (WCAG SC 4.1.2 Name, Role, Value), though you could fix that by using <button>;
    – does not convey the state (WCAG SC 4.1.2 Name, Role, Value), which could be corrected with aria-pressed on a <button>.

    If you do all that, then you may want to come up with a more appropriate accessible name than “light dark”.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support toukirwpdev

    (@toukirwpdev)

    Hi @adrian-roselli,

    Sorry for your inconvenience.

    Please contact our support. We will definitely help you in this matter.

    Thanks.

    Thread Starter Adrian Roselli

    (@adrian-roselli)

    I said I would update folks here.

    I contacted support and pasted what I originally wrote above. I received a ticket number (5772) but cannot create an account to view it, which I raised on Twitter. Someone who may or may not be a representative of WPPOOL responded in a tweet saying my suggestion had been approved.

    I received the following response:

    `Thanks for contacting us. Are you referring to the WCAG guidelines?

    However, we have few reasons why we could not use the direct button because we have to change the switch in Dark mode/Light mode based on OS aware, admin wishes, Location based and swapping on dark to light view.

    Our developer has developed the product accordingly WordPress Plugin Development Guidelines.

    Thank you so much for letting us know your concern. Your thoughts will help us to represent plugin in more well-organized but if you have any other issues with the plugin feel free to share.

    Have a nice day. We will definitely let you know if we get any updates from our product manager. Thanks`

    My response (via email):

    `Yes, I am referring to the Web Content Accessibility Guidelines (WCAG).

    None of the reasons you cite prevents you from using a standard <button> with aria-pressed. I have experience in this realm, including with dark/light buttons. Regardless, none of those issues gets a site a free pass should an accessibility complaint come their way. A keyboard user is still unable to use it, and a sighted screen reader user may not be able to use it.

    The Plug-in Development Guidelines are silent on accessibility in general because they focus on development processes. That being said, WordPress itself is committed to accessibility, however haltingly, as stated here: https://ww.wp.xz.cn/about/accessibility/

    As it stands now, I cannot recommend this plug-in for anyone and have to actively counsel sites to remove it since it introduces WCAG errors. Which presents a legal risk in some scenarios and definitely a barrier to users.`

    Will update as I get more.

    Thread Starter Adrian Roselli

    (@adrian-roselli)

    Latest response, via email:

    Thanks for your information and guideline. We are really excited and we will definitely work on it.
    You can be sure that a confirmation mail will be sent to you whenever we start work.

    I look forward to seeing this bug fixed.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Toggle control fails WCAG’ is closed to new replies.