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

WCAG Pagination: Added Button Support #9755

Merged
merged 5 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion site/pages/docs/ref/paginate/paginate-en.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"categoryfile": "plugins",
"description": "Adds pagination at the bottom of a list of items.",
"altLangPrefix": "paginate",
"dateModified": "2023-05-15"
"dateModified": "2024-04-25"
}
---

Expand Down Expand Up @@ -118,6 +118,12 @@
</dl>
</td>
</tr>
<tr>
<td><code>buttonsUI</code></td>
<td>The pagination will use <code>&lt;button&gt;</code> tags instead of <code>&lt;a&gt;</code> tags.</td>
<td>Boolean</td>
<td><code>true</code></td>
BrahimMahadi marked this conversation as resolved.
Show resolved Hide resolved
</tr>
</tbody>
</table>
</section>
Expand Down
8 changes: 7 additions & 1 deletion site/pages/docs/ref/paginate/paginate-fr.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"categoryfile": "plugins",
"description": "Ajoute une pagination à la fin d'une liste d'items.",
"altLangPrefix": "paginate",
"dateModified": "2023-05-15"
"dateModified": "2024-04-25"
}
---

Expand Down Expand Up @@ -127,6 +127,12 @@
</dl>
</td>
</tr>
<tr>
<td><code>buttonsUI</code></td>
<td>La pagination utilisera des balises <code>&lt;button&gt;</code> au lieu de balises <code>&lt;a&gt;</code>.</td>
<td>Booléen</td>
<td><code>true</code></td>
BrahimMahadi marked this conversation as resolved.
Show resolved Hide resolved
</tr>
</tbody>
</table>
</section>
Expand Down
65 changes: 65 additions & 0 deletions src/plugins/paginate/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,71 @@
border-bottom-right-radius: 4px;
border-top-right-radius: 4px;
}

BrahimMahadi marked this conversation as resolved.
Show resolved Hide resolved
li.active:nth-last-child(2) button {
border-bottom-right-radius: 4px;
border-top-right-radius: 4px;
}

.pagination {
& > li {
&.active {
& > button {
cursor: default;
outline-offset: -2px;
}
}
& > button {
background-color: $btn-default-bg;
border: 1px solid $btn-default-border;
color: $btn-default-color;
margin-bottom: .5em;
margin-left: -1px;
padding: 10px 16px;
position: relative;

&:hover, &:focus {
background-color: #d4d6da;
border-color: #bbbfc5;
z-index: 2;
}
BrahimMahadi marked this conversation as resolved.
Show resolved Hide resolved
}
&.disabled {
& + li {
& > button {
border-bottom-left-radius: $pager-border-radius;
border-top-left-radius: $pager-border-radius;
}
}
}

&:first-child {
& > button {
border-bottom-left-radius: $pager-border-radius;
border-top-left-radius: $pager-border-radius;
margin-left: 0;
}
}

&:last-child {
& > button {
border-bottom-right-radius: $pager-border-radius;
border-top-right-radius: $pager-border-radius;
}
}

}

& > .active {
& > button, & > button:focus, & > button:hover {
background-color: $brand-primary;
border-color: $brand-primary;
color: #fff;
cursor: default;
z-index: 3;
}
}
}
}

html:not(.wb-disable) .wb-pgfltr-out {
Expand Down