This repository was archived by the owner on Jun 26, 2018. It is now read-only.
DP-3222-3914 [a11y] heading levels adjustment for imagePromo items #682
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In the template
@organizms/image-promos.twig, the heading number for each image promo item is supposed to have a value of the [heading number forimagePromos.compHeading+ 1], but in the original template, it was assigned to the template's default valuepromoHeading = 2instead.This was causing put a semantically incorrect heading number to imagePromo items in Location page. Also, to optimize DP-3222-3914 [a11y] heading levels adjustment #1387, a heading number value should passed on from its parent heading by increasing its value by 1 from its parent value and avoid using default value, which is static value.
A variable for the image promo item heading number is set up. It checks for a value of
compHeading.level, which is the heading number value for its parent heading, and if the value exist, use the value increasing by 1, if not, use the default value set bypromoHeading.Related Issue / Ticket
Steps to Test
Testing needs to be done in Drupal with
5.10.1-alpha-3222, which includes this change.Go to a location page with an "Actions" section which has image promo content. Sample page: /locations/wells-state-park
Check the heading for "Actions" and image promo item's heading titles for their heading numbers.
compHeading) matches to othercompHeading's in the main content column such as Overview, Hours, Accessibilities, and etc. In this case, 3.compHeading+ 1, which is 4, not the template default value of 2.Screenshots
Additional Notes:
Anything else to add?
Impacted Areas in Application
@todo
Today I learned...