Problem/Motivation
When I add logo img to sites I don't get a ALT && Title field as I would get when adding an image_field to nodes.
Proposed resolution
Thus, it seems there is no simple GUI way to add these; By now I myself added them through the twig, but I humbly suggest adding these fields as ensuring valid usage of Drupal for all users. Also, they're quite important for SEO.
Sending people to add these from at the SQL or by an external module should be avoided, I think.
Remaining tasks
The tests that were added need reviewing by someone experienced with tests.
We still need to decide whether we should reference the newly created variables in the twig templates or just stick with the markup defined in variables content ie:
Option 1 (current patch):
$variables['site_logo_alt'] = $variables['content']['site_logo_alt']['#markup'];
$variables['site_logo_title'] = $variables['content']['site_logo_title']['#markup'];
Versus Option 2 (proposed in #23, saying we should maybe not create new variables, and just reference the markup from the existing $variables['content'])
$variables['content']['site_logo_alt']['#markup'];
$variables['content']['site_logo_title']['#markup'];
In #30 it's suggested that using option 1 is okay. Option 1 makes it so we lose the #access part of the render array. If you look at other variables like 'site_name', and 'site_slogan', they do not have the #access part of the render array. Here's an example of some other variables that don't have #access:
'site_logo' => string(35) "/drupal/core/themes/bartik/logo.svg"
'site_logo_alt' => string(0) ""
'site_logo_title' => string(0) ""
'site_name' => string(6) "Drupal"
'site_slogan' => string(0) ""
Completed Tasks
Configuration for the logo alt attribute and title attribute has been added in two cases:
1) When you use the default logo
2) When you upload your own custom logo
The system branding block has been updated to support the logo alt and logo title attributes in the Bartik, Classy and Stable themes.
Testing for saving the alt attribute and title attribute has been added in a patch in
https://www.drupal.org/node/2780293#comment-12061662 →
(#40). Testing to ensure the alt and title attributes show in the branding block have been added in patch
https://www.drupal.org/node/2780293#comment-12073031 →
(#45)
@rovo: has tested accessibility via Wave in #34