Type-on-Strap icon indicating copy to clipboard operation
Type-on-Strap copied to clipboard

navbar's icon-only link should have title in mobile mode

Open yshrsmz opened this issue 3 years ago β€’ 1 comments

Is your feature request related to a problem? Please describe.

The current implementation(screenshot below) can be improved in terms of accessibility.

γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2022-08-25 19 38 30

Describe the solution you'd like

like this.

γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ 2022-08-25 19 37 02

My current implementation is something like this:

{% for page in site.pages %}
    {% unless page.title == null or page.hide or name_page contains page.title %}
    <li class="separator"> | </li>
    <li>
        <a class="clear" aria-label="{{ page.title }}" title="{{ page.title }}" href="{{ page.url | relative_url }}">
            {% if page.icon %} <i class="fas {{ page.icon }}" aria-hidden="true"></i>{% endif%}
            <span class="menu-label {%if page.icon %}menu-label-with-icon{% endif%}">{{ page.title }}</span>
        </a>
    </li>
    {% endunless %}
    {% assign name_page = page.title | append: name_page %}
{% endfor %}

This is a breaking change, but I can send a PR if you like this proposal.

Describe alternatives you've considered

Align icon-only links in a single row?

Additional context Add any other context or screenshots about the feature request here.

yshrsmz avatar Aug 25 '22 10:08 yshrsmz

Hi thanks!

I was thinking about it, but did not take the time to implement it. I could take a look at your implementation and see where we can go from there.

sylhare avatar Aug 30 '22 13:08 sylhare

Closing this one as it will be done in #394

sylhare avatar Aug 10 '23 15:08 sylhare