Skip to content

Commit e3c8f90

Browse files
authored
Update Breadcrumbs markup to match w3 aria example (#1590)
1 parent 8e3d346 commit e3c8f90

File tree

5 files changed

+23
-7
lines changed

5 files changed

+23
-7
lines changed

.changeset/ninety-bags-cover.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/css": patch
3+
---
4+
5+
Update Breadcrumbs markup to match w3 aria example.

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ If your proposal fixes any issues, please list them below, then delete this line
66

77
Finally, tell us more about the change here, in the description.
88

9-
/cc @primer/ds-core
9+
/cc @primer/css-reviewers

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Anyone can open a pull request on Primer CSS. You do not need to work at GitHub
5858
2. Configure and install the dependencies: `npm install`
5959
3. Create a new branch from main `git checkout -b my-branch-name`
6060
4. Make your changes and commit them.
61-
5. Push your branch and open a pull request. Add a comment describing your proposed changes and request a review from `@primer/ds-core`.
61+
5. Push your branch and open a pull request. Add a comment describing your proposed changes and request a review from `@primer/css-reviewers`.
6262
6. Wait for CI tests to finish.
6363
- If the tests pass, you should see a status check telling you which alpha version of `@primer/css` you can install with npm to test your work in other projects.
6464
- If the tests fail, review the logs and address any issues.

docs/content/components/breadcrumb.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,22 @@ Breadcrumbs are used to show taxonomical context on pages that are many levels d
1212
- Do not have a section-level navigation
1313
- May need the ability to quickly go back to the previous (parent) page
1414

15+
All items must contain links, and the last item must be selected.
16+
1517
#### Usage
1618

1719
```html live
1820
<nav aria-label="Breadcrumb">
1921
<ol>
20-
<li class="breadcrumb-item"><a href="https://github.com/business">Business</a></li>
21-
<li class="breadcrumb-item"><a href="https://github.com/business/customers">Customers</a></li>
22-
<li class="breadcrumb-item" aria-current="page">MailChimp</li>
22+
<li class="breadcrumb-item">
23+
<a href="https://github.com/business">Business</a>
24+
</li>
25+
<li class="breadcrumb-item">
26+
<a href="https://github.com/business/customers">Customers</a>
27+
</li>
28+
<li class="breadcrumb-item breadcrumb-item-selected">
29+
<a href="https://github.com/business/customers/mailchimp" aria-current="page">MailChimp</a>
30+
</li>
2331
</ol>
2432
</nav>
2533
```

src/breadcrumb/breadcrumb.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@
2222

2323
.breadcrumb-item-selected,
2424
.breadcrumb-item[aria-current]:not([aria-current=false]) {
25-
color: var(--color-fg-default);
26-
2725
&::after {
2826
content: none;
2927
}
3028
}
29+
30+
// stylelint-disable selector-max-type
31+
.breadcrumb-item-selected a {
32+
color: var(--color-fg-default);
33+
}

0 commit comments

Comments
 (0)