开发者 | webmandesign |
---|---|
更新时间 | 2024年10月4日 02:46 |
screen-reader-text
)archive-title
folder into the /wp-content/plugins/
directory.Archive page contains an archive - a list of posts or custom post types. WordPress recognizes 6 types of archives: category, tag, author, custom post type, custom taxonomy and date.
Title of every archive page contains an 'archive label' (please note this is a terminology used in this plugin). By default it is the first text in archive title followed with colon. For example, a category archive page with title of "Category: Uncategorized" has an archive label of "Category:".
This plugin integrates its settings directly into Settings → Reading WordPress admin page. You can edit plugin options under "Archive Title Options" section on that page.
The plugin allows you to remove the archive title label completely or to hide it accessibly. Accessible hiding causes wrapping the archive title label in a <span class="screen-reader-text">
HTML element.
Every WordPress theme should provide styles for the screen-reader-text
CSS class. And every text wrapped in such CSS class element will be hidden from visibility, but will be still accessible for assistive devices, such as screen reader.
We recommend using this option instead of removing the label completely.
Yes you can.
You can override the CSS class by defining the ARCHIVE_TITLE_CSS_CLASS_A11Y
constant in your child theme's functions.php
like so:
define( 'ARCHIVE_TITLE_CSS_CLASS_A11Y', 'your-theme-accessibly-hidden-class' );
Well, the only 2 use cases I can think of for this option would be:
changelog.md
file for details.