From 673952ca9399edd799365e3efa09671e05c3588f Mon Sep 17 00:00:00 2001 From: msynk Date: Sat, 22 Aug 2026 14:09:01 +0330 Subject: [PATCH 1/2] apply BitPagination improvements #12978 --- .../Navs/Pagination/BitPagination.razor | 204 ++-- .../Navs/Pagination/BitPagination.razor.cs | 318 +++++-- .../Navs/Pagination/BitPagination.scss | 31 + .../Pagination/BitPaginationClassStyles.cs | 5 + .../Navs/Pagination/BitPaginationDemo.razor | 228 +++-- .../Pagination/BitPaginationDemo.razor.cs | 102 +- .../BitPaginationDemo.razor.samples.cs | 129 ++- .../Navs/Pagination/BitPaginationTests.cs | 901 +++++++++++++++++- 8 files changed, 1632 insertions(+), 286 deletions(-) diff --git a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Pagination/BitPagination.razor b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Pagination/BitPagination.razor index 7197f079edd..cb607472a4f 100644 --- a/src/BlazorUI/Bit.BlazorUI/Components/Navs/Pagination/BitPagination.razor +++ b/src/BlazorUI/Bit.BlazorUI/Components/Navs/Pagination/BitPagination.razor @@ -1,85 +1,133 @@ @namespace Bit.BlazorUI @inherits BitComponentBase -
- @if (ShowFirstButton) - { - var firstIcon = BitIconInfo.From(FirstButtonIcon, FirstButtonIconName ?? "ChevronRightEnd6 bit-pgn-trs"); - - } +@* The pagination is a navigation landmark wrapping a list of page controls, which is the markup every + major design system settles on, so assistive technologies announce it as navigation and enumerate its + items instead of reading a bare run of buttons. + The list and its items are collapsed with display:contents so the buttons stay the direct flex items of + the root and the layout (including any gap coming through Styles.Root) is exactly what it was before the + list was introduced. The explicit list roles are there because a box removed by display:contents used to + lose its implicit semantics in some browser / screen reader combinations. *@ +@* The aria-label sits before the attribute splatting so that an aria-label passed as a plain attribute + still wins over the default name of the landmark, while the id, the style, the class and the dir stay + after it and keep the ones the component renders. *@ +@if (HideOnSinglePage is false || _Count > 1) +{ +