Skip to content

Commit af6e176

Browse files
committed
Pager: remove role, tabindex attributes from links
1 parent 8ba1bd0 commit af6e176

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

a11y-add-on-for-facetwp.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ function a11y_addon_transform_facet_markup( $output, $params ) {
142142

143143
case 'pager':
144144

145-
$wrapper = '<nav class="navigation pagination" aria-label="Pagination"><h2 class="screen-reader-text">Pagination</h2>';
146-
147145
$output = sprintf('
148146
<nav class="navigation pagination" aria-label="Pagination"><h2 class="screen-reader-text">Pagination</h2>%1$s</nav>',
149147
$output);
148+
149+
break;
150150

151151
default:
152152

@@ -205,12 +205,6 @@ function remove_underscores( name ) {
205205

206206
// pager
207207
$('.facetwp-pager').attr('role', 'navigation');
208-
$('.facetwp-page').each(function(e) {
209-
let $el = $(this);
210-
$el.attr('role', 'button');
211-
$el.attr('tabindex', 0);
212-
});
213-
214208

215209
// Add labels
216210
$('.facetwp-facet').each(function() {

0 commit comments

Comments
 (0)