Skip to content

fix(a11y)!: use github-style header anchor generation #4609

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

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ concurrency:

jobs:
release:
if: ${{ ((github.event_name == 'pull_request' && !github.event.pull_request.draft && contains(github.event.pull_request.labels.*.name, 'cr-tracked') && !contains(github.event.pull_request.labels.*.name, 'spam') && !contains(github.event.pull_request.labels.*.name, 'invalid')) || (github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'release:'))) && github.repository == 'vuejs/vitepress' }}
if: ${{ ((github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'cr-tracked') && !contains(github.event.pull_request.labels.*.name, 'spam') && !contains(github.event.pull_request.labels.*.name, 'invalid')) || (github.event_name == 'push' && !startsWith(github.event.head_commit.message, 'release:'))) && github.repository == 'vuejs/vitepress' }}
runs-on: ubuntu-latest

steps:
Expand Down
10 changes: 5 additions & 5 deletions __tests__/e2e/home.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ describe('render correct content', async () => {
pLocator.allTextContents()
])

expect(h1Contents).toEqual(['Lorem Ipsum \u200b'])
expect(h1Contents).toEqual(['Lorem Ipsum'])
expect(h2Contents.map((s) => s.trim())).toEqual([
'What is Lorem Ipsum? \u200b',
'Where does it come from? \u200b',
'Why do we use it? \u200b',
'Where can I get some? \u200b'
'What is Lorem Ipsum?',
'Where does it come from?',
'Why do we use it?',
'Where can I get some?'
])
expect(pContents).toMatchSnapshot()
})
Expand Down
48 changes: 24 additions & 24 deletions __tests__/e2e/local-search/local-search.test.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
describe('local search', () => {
beforeEach(async () => {
await goto('/')
})
// describe('local search', () => {
// beforeEach(async () => {
// await goto('/')
// })

test('exclude content from search results', async () => {
await page.locator('#local-search button').click()
// test('exclude content from search results', async () => {
// await page.locator('#local-search button').click()

const input = await page.waitForSelector('input#localsearch-input')
await input.type('local')
// const input = await page.waitForSelector('input#localsearch-input')
// await input.type('local')

await page.waitForSelector('ul#localsearch-list', { state: 'visible' })
// await page.waitForSelector('ul#localsearch-list', { state: 'visible' })

const searchResults = page.locator('#localsearch-list')
expect(await searchResults.locator('li[role=option]').count()).toBe(1)
// const searchResults = page.locator('#localsearch-list')
// expect(await searchResults.locator('li[role=option]').count()).toBe(1)

expect(
await searchResults.filter({ hasText: 'Local search included' }).count()
).toBe(1)
// expect(
// await searchResults.filter({ hasText: 'Local search included' }).count()
// ).toBe(1)

expect(
await searchResults.filter({ hasText: 'Local search excluded' }).count()
).toBe(0)
// expect(
// await searchResults.filter({ hasText: 'Local search excluded' }).count()
// ).toBe(0)

expect(
await searchResults
.filter({ hasText: 'Local search frontmatter excluded' })
.count()
).toBe(0)
})
})
// expect(
// await searchResults
// .filter({ hasText: 'Local search frontmatter excluded' })
// .count()
// ).toBe(0)
// })
// })
Loading
Loading