Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 303342

Should core output invisible but audible block titles, and how?

$
0
0

Spin off of / follow up to #1968360: Remove per-region block markup. In that issue, we are removing bartik_preprocess_block()'s adding of the 'element-invisible' class to blocks in the header and footer regions, and replacing it with a copy of the same CSS rules targeted to region-specific selectors. That results in no change to functionality or accessibility.

However, in the course of that issue, several questions emerged:

1) Do we want Bartik setting an example of hiding the block title based on region? In that issue, @ry5n said

Changing the appearance or structure of a UI component based solely on its placement is not a great idea. It is the opposite of modular UI.

2) Currently, when configuring a block (regardless of region), there's a checkbox for "Display title", so you can decide on a block by block basis whether to show the title. However, unchecking the box results in no title rendered in the markup. For accessibility, do we want to change this to instead output the title in the markup, but with an 'element-invisible' class, so it's still read to screen readers? Or, do we want to change the UI to allow a choice of whether to show the title, add it to the markup as invisible, or remove from markup entirely? @ry5n said:

I’m not a big fan of a config option (and yet more UI) for block title display.

For reference, here's a screenshot of the home page after a Standard install with all special region handling of block title removed (both from PHP and CSS). The header menu doesn't show a title, because that's not a block yet, but will be after #1869476: Convert global menus (primary links, secondary links) into blocks. The footer menu shows a title and that's what we presumably don't want, because it's ugly. We can remove the title by adjusting the label_display line in core/profiles/standard/config/block.block.bartik.footer.yml, but unless we do something for #2 above, that would remove it from screen readers as well.

AttachmentSizeStatusTest resultOperations
block-titles.png111.24 KBIgnored: Check issue status.NoneNone

Viewing all articles
Browse latest Browse all 303342

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>