Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A11y/core fixes #14935

Merged
merged 12 commits into from
May 23, 2024
13 changes: 9 additions & 4 deletions CHANGELOG-WIP.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
- Table views within element index pages are no longer scrolled directly. ([#14927](https://github.com/craftcms/cms/pull/14927))
- Improved the look of user gradicons when selected.

### Accessibility
- Added the “Status” column option to category, entry, and user indexes. ([#14968](https://github.com/craftcms/cms/pull/14968))
- Element cards now display a textual status label rather than just the indicator. ([#14968](https://github.com/craftcms/cms/pull/14968))

### Administration
- Added the `--format` option to the `db/backup` and `db/restore` commands for PostgreSQL installs. ([#14931](https://github.com/craftcms/cms/pull/14931))
- The `db/restore` command now autodetects the backup format for PostgreSQL installs, if `--format` isn’t passed. ([#14931](https://github.com/craftcms/cms/pull/14931))
Expand All @@ -26,6 +22,15 @@
- Added the `withCustomFields` element query param. ([#15003](https://github.com/craftcms/cms/pull/15003))
- Entry queries now support passing `*` to the `section` param, to filter the results to all section entries. ([#14978](https://github.com/craftcms/cms/discussions/14978))

### Accessibility
- Added the “Status” column option to category, entry, and user indexes. ([#14968](https://github.com/craftcms/cms/pull/14968))
- Element cards now display a textual status label rather than just the indicator. ([#14968](https://github.com/craftcms/cms/pull/14968))
- Darkened the color of page sidebar toggle icons to meet the minimum contrast for UI components.
- Darkened the color of context labels to meet the minimum contrast for text.
- Darkened the color of footer links to meet the minimum contrast for text.
- Set the language of the Craft edition in the footer, to improve screen reader pronunciation for non-English languages.
- The accessible name of “Select site” buttons is now translated to the current language.

### Extensibility
- Added `craft\db\getBackupFormat()`.
- Added `craft\db\getRestoreFormat()`.
Expand Down
7 changes: 4 additions & 3 deletions src/templates/_layouts/components/global-sidebar.twig
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,11 @@
{% if currentUser.admin and devMode %}
{% set devModeText = 'Craft CMS is running in Dev Mode.'|t('app') %}
<div id="devmode">
{{ tag('span', {
{% tag 'span' with {
class: 'visually-hidden',
text: devModeText
}) }}
} %}
{{ devModeText|raw }}
{% endtag %}
</div>
{% endif %}
</div>
Expand Down
10 changes: 6 additions & 4 deletions src/templates/_layouts/cp.twig
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,12 @@ history.replaceState(undefined, undefined, window.location.href.match(/^[^#]*/)[
<div id="app-info">
{% set fullEditionName = '{edition} edition'|t('app', {edition: editionName}) %}
<span>
Craft CMS
<span id="edition-logo" title="{{ fullEditionName }}">
<span aria-hidden="true">{{ editionName }}</span>
<span class="visually-hidden">{{ fullEditionName }}</span>
<span lang="en">
Craft CMS
<span id="edition-logo" title="{{ fullEditionName }}">
<span aria-hidden="true">{{ editionName }}</span>
<span class="visually-hidden">{{ fullEditionName }}</span>
</span>
</span>
{{ craft.app.version }}
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_layouts/elementindex.twig
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
label: selectedSite.name|t('site'),
menu: {
items: siteMenuItems(selectableSites, selectedSite),
label: 'Select site'|t('site')
label: 'Select site'|t('app')
}
}) %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/globals/_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
label: requestedSite.name|t('site'),
menu: {
items: siteMenuItems(null, requestedSite),
label: 'Select site'|t('site')
label: 'Select site'|t('app')
},
}] %}
{% endif %}
Expand Down
3 changes: 2 additions & 1 deletion src/translations/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@
'County' => 'County',
'Craft CMS does not support backtracking to this version. Please update to Craft CMS {version} or later.' => 'Craft CMS does not support backtracking to this version. Please update to Craft CMS {version} or later.',
'Craft CMS edition changed.' => 'Craft CMS edition changed.',
'Craft CMS is running in Dev Mode.' => 'Craft CMS is running in Dev Mode.',
'Craft CMS is running in Dev Mode.' => '<span lang="en">Craft CMS</span> is running in Dev Mode.',
'Craft Support' => 'Craft Support',
'Craft isn’t installed yet.' => 'Craft isn’t installed yet.',
'Craft {version} Upgrade' => 'Craft {version} Upgrade',
Expand Down Expand Up @@ -1372,6 +1372,7 @@
'Select context' => 'Select context',
'Select element' => 'Select element',
'Select section' => 'Select section',
'Select site' => 'Select site',
'Select transform' => 'Select transform',
'Select volume' => 'Select volume',
'Select {element}' => 'Select {element}',
Expand Down
2 changes: 1 addition & 1 deletion src/web/CpScreenResponseFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private function _formatTemplate(YiiResponse $response, CpScreenResponseBehavior
'icon' => Cp::earthIcon(),
'label' => Craft::t('site', $behavior->site->name),
'menu' => [
'label' => Craft::t('site', 'Select site'),
'label' => Craft::t('app', 'Select site'),
'items' => !empty($behavior->selectableSites)
? Cp::siteMenuItems($behavior->selectableSites, $behavior->site, [
'includeOmittedSites' => true,
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/admintable/dist/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/admintable/dist/js/app.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/web/assets/cp/src/css/_cp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ $systemInfoHoverBgColor: darken($grey800, 10%);
}

#global-footer {
--link-color: #1453db;
display: flex;
flex-direction: column;
align-items: center;
Expand Down
6 changes: 5 additions & 1 deletion src/web/assets/cp/src/css/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1724,6 +1724,10 @@ ul.icons {
color: var(--gray-300);
}
}

.cp-icon svg {
@include svg-mask(currentColor); // Matches color of font icons
}
}

.disabled:not(.status):not(.status-label) {
Expand Down Expand Up @@ -3415,7 +3419,7 @@ table {
font-size: 11px;
font-weight: normal;
text-decoration: none !important;
color: var(--light-text-color);
color: var(--medium-dark-text-color);
border-radius: calc(var(--touch-target-size) / 2);
border: 1px solid var(--medium-hairline-color);
}
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/pluginstore/dist/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/pluginstore/dist/js/app.js.map

Large diffs are not rendered by default.