Support » Plugin: One Click Accessibility » Cannot disable High Contrast or Negative Contrast

  • Set one to disabled, both to disabled, and both remain within the Accessibility menu.

    I’d like to disable just Negative Contrast, as I prefer the High Contrast mode, and on my site both modes look identical apart from one having more colours.

    Anyone else having this issue?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Same problem here, they won’t switch off even when disabled. I’m using Elementor with Hello Theme.

    casey michigan

    (@caseycaseysheadcom)

    I am having the same issue. I am using the Salient theme.

    robertzembrzycki

    (@robertzembrzycki)

    Same here, using Divi theme.

    Thread Starter samuraiprojects

    (@samuraiprojects)

    Just to tag a potential easy development workaround that could allow users to get around this more easily:

    If it is not possible to change the plugin to allow High Contrast and/or Negative Contrast to be disabled:

    – Give the list items their own individual class names, so they can be styled/hidden. As of now they take on the Body text and may not necessarily fit within a site’s nav style

    What worked here was to manually fix some lines on file pojo-a11y-frontend.php.

    1) To be able to disable high contrast, change the string ‘contrast’ to ‘high_contrast’ on line 139, i.e.,

    change

    <?php if ( $this->is_toolbar_button_active( 'contrast' ) ) : ?>

    to

    <?php if ( $this->is_toolbar_button_active( 'high_contrast' ) ) : ?>

    2) To be able to disable negative contrast, you have to add the if condition that is missing on line 147. To do so, wrap the <li>...</li> from lines 147 to 152 with the condition:

    <?php if ( $this->is_toolbar_button_active( 'negative_contrast' ) ) : ?>
        <li>...</li>
    <?php endif; ?>

    Of course, this is a temporary fix that worked here.

    If you going to make these changes make sure to make a backup of the file pojo-a11y-frontend.php before.

    Hope it helps

    Thank you! I will edit my file then try using this plugin.

    @seanalvarenga I am using Divi and editing pojo-a11y-frontend.php worked just fine. Thank you so much for this.

    Thread Starter samuraiprojects

    (@samuraiprojects)

    @seanalvarenga Well done! This works like a charm, thank you so much.

    Hi,

    @seanalvarenga solution is great but until the developer incorporates a permanent solution in the future, you can just overcome this bug with some CSS. Every link in the plugin has its own class so you can hide it like below:

    To hide high contrast:
    a.pojo-a11y-toolbar-link.pojo-a11y-btn-background-group.pojo-a11y-btn-high-contrast { display: none !important; }

    To hide negative contrast:
    a.pojo-a11y-toolbar-link.pojo-a11y-btn-background-group.pojo-a11y-btn-negative-contrast { display: none !important; }

    • This reply was modified 7 months, 4 weeks ago by v234.
    • This reply was modified 7 months, 4 weeks ago by v234.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Cannot disable High Contrast or Negative Contrast’ is closed to new replies.