Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
31 changes: 31 additions & 0 deletions css/mistica-common.css
Comment thread
atabel marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,37 @@
color: var(--vcolor-tagTextError);
}

/* Breadcrumbs */
.mistica-breadcrumb-list {
display: flex;
flex: 1;
align-items: flex-end;
padding: 0;
margin: 0;
list-style: none;

Comment thread
atabel marked this conversation as resolved.
}

[class^='mistica-breadcrumb-'] {
Comment thread
atabel marked this conversation as resolved.
Outdated
text-decoration: none;
font-size: var(--mistica-font-size-1);
line-height: var(--mistica-line-height-1);
font-weight: var(--mistica-font-weight-1);
color: var(--vcolor-textPrimary);
}

.mistica-breadcrumb-separator {
padding-right: 3px;
}

.mistica-breadcrumb-text:hover {
text-decoration: underline;
}

.mistica-breadcrumb-text-current {
color: var(--vcolor-textSecondary);
}

/* Buttons */
[class^='mistica-button'] {
--button-font-size: var(--mistica-font-size-3);
Expand Down
25 changes: 25 additions & 0 deletions examples/css/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,31 @@ <h3 class="mistica-text-title2">Tag</h3>
<div class="mistica-tag-error">Error</div>
</div>

<h3 class="mistica-text-title2">Breadcrumbs</h3>
<div class="cards-group">
<nav>
<ol class="mistica-breadcrumb-list">
Comment thread
atabel marked this conversation as resolved.
Outdated
<li class="mistica-breadcrumb-list-item">
<a href="/" class="mistica-breadcrumb-text">
Home
</a>
<span class="mistica-breadcrumb-separator">/</span>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could avoid this span by adding the / with an :after pseudoelement

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed and added the pseudo element

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WAI ARIA recommends to avoid including the element as content since the screen reader will stop at it and read it.

Screenshot 2025-05-05 at 12 37 24

This is how they solve this problem

using a display technique that is not represented in the accessibility tree used by screen readers prevents redundant and potentially distracting verbosity

Extracted from: https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/examples/breadcrumb/

Would be also ideal to change React implementation to follow this? @atabel

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in react implementation we use separated divs for /, so we could just add aria-hidden there

</li>
<li class="mistica-breadcrumb-list-item">
<a href="/" class="mistica-breadcrumb-text">
Section
</a>
<span class="mistica-breadcrumb-separator">/</span>
</li>
<li class="mistica-breadcrumb-list-item">
<span class="mistica-breadcrumb-text-current">
Subsection
</span>
Comment thread
atabel marked this conversation as resolved.
Outdated
</li>
</ol>
</nav>
</div>

<h3 class="mistica-text-title2">Buttons</h3>
<div>
<a class="mistica-button-primary" href="#">Primary</a>
Expand Down