mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-26 05:30:19 +03:00

- The pagination labels 'First', 'Previous', 'Next' and 'Last' are
hidden away when the screen width becomes smaller. However this also
hides them from the screen reader. Instead of using `display: none`, use
some well-known tricks to still make them visible to the screen reader.
- Add E2E test.
- Resolves Codeberg/Community#1858
(cherry picked from commit b6072496d4
)
15 lines
443 B
TypeScript
15 lines
443 B
TypeScript
// @watch start
|
|
// template/base/paginate.tmpl
|
|
// services/context/pagination.go
|
|
// @watch end
|
|
|
|
import {expect} from '@playwright/test';
|
|
import {test} from './utils_e2e.ts';
|
|
import {accessibilityCheck} from './shared/accessibility.ts';
|
|
|
|
test('Pagination a11y', async ({page}) => {
|
|
await page.goto('/explore/repos');
|
|
|
|
await expect(page.locator('.pagination')).toBeVisible();
|
|
await accessibilityCheck({page}, ['.pagination'], [], []);
|
|
});
|