承接 bluecadet/bluecadet_accessibility 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bluecadet/bluecadet_accessibility

最新稳定版本:1.0.0-alpha1

Composer 安装命令:

composer require bluecadet/bluecadet_accessibility

包简介

Adds utilities to aide in development

README 文档

README

  • Introduction
  • Installation
  • Configuration
  • FAQ
  • Maintainers
  • Changelog

INTRODUCTION

This module handles custom functionality for bluecadet_accessibility. Current Functionality:

  • Add a option in Views when using AJAX for enhanced accessibility.

INSTALLATION

CONFIGURATION

Configuration can be found on a view under the Display formatter.

Assumptions about our view templates:

  • Maintain “views” class names, but can add pre-defined or custom class names.
  • Assume basic top level template (views-view.html.twig) structure.
  • Results should be in an unordered list (the list part is the important part) . Unordered lists help screen reader users navigate from the first item in a list to the end of the list or jump to the next list. It can also help them bypass groups of links if they choose to. (W3C, H48: Using ol, ul and dl for lists or groups of links
  • There should be a title (can be screen reader only) <h2 class="u-sr-only view-content__header" tabIndex="0">Results</h2> default is before ul and a child of “view-content”
  • Need a header, which is usually an h2, before filters and before results ideally <h2 class="u-sr-only view-filters__header">Filter Results</h2> and <h2 class="u-sr-only view-content__header">Results</h2> is visually hidden.
  • Buttons and pagers can set a data-announce-text attr which will be announced rather than a generic string.

How to add custom announce text to templates (exposed forms, pager templates).

Form elements

<button type="submit" data-announce-text="Searching the site" class="c-search-header__search-submit"{{ attributes }}>
	Search
</button>

OR

<button type="submit" data-announce-text="Filter the results" class="c-search-header__search-submit"{{ attributes }}>
	Filter
</button>

Pager elements

...

{% for key, item in items.pages %}
  <li class="c-pagination__item{{ current == key ? ' is-active' : '' }}">
    <a href="{{ item.href }}" data-announce-text="Navigating to Page {{ key }}" {{ item.attributes|without('href', 'title') }} {{current == key ? 'aria-current="page"' : null}}>
      <span class="u-sr-only">Page&nbsp;</span>
      {{- key -}}
    </a>
  </li>
{% endfor %}

...

Optional CSS for smooth scrolling

html {
  scroll-behavior: smooth;
}

MAINTAINERS

Current maintainers:

This project has been sponsored by:

CHANGELOG

Unreleased

1.x

  • Adds Drupal Views Display Extender for enhanced accessibility.



Proudly developed @ Bluecadet

Bluecadet

统计信息

  • 总下载量: 33
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2023-11-02