• Lens Digital

    (@lensdigital)


    Hi,

    I am trying to improve the accessibility of our football club website. I have been running the website through the Wave Accessibility Tool.

    It is flagging that SportsPress is generating an empty table header when using the Events Block shortcode. Looking at the code on GitHub, it says that the TH row is needed for DataTables.

    Is there a way to tweak the TH row to make it accessible (with breaking the DataTable) ?

    I know this is a niche request but thanks for all of your work on the plugin.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi there @lensdigital ,

    You can try to copy the event-blocks.php from wp-content/plugins/sportspress/templates/ to wp-content/themes/your-child-theme/sportspress/ folder and then replace the empty TH row with that one line to add visually-hidden text instead of nothing:

    <thead><tr><th><span class="screen-reader-text">Events</span></th></tr></thead>

    screen-reader-text is a class most WordPress themes already define (visually hidden but readable by screen readers). If yours does not have it, add this to your theme’s CSS:

    .screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
    }

    Thanks,
    Savvas

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.