Skip to content
This repository was archived by the owner on Jun 26, 2018. It is now read-only.

Conversation

@ygannett
Copy link
Contributor

@ygannett ygannett commented Jan 31, 2018

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 for imagePromos.compHeading + 1], but in the original template, it was assigned to the template's default value promoHeading = 2 instead.

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 by promoHeading.

Related Issue / Ticket

Steps to Test

Testing needs to be done in Drupal with 5.10.1-alpha-3222, which includes this change.

  1. Go to a location page with an "Actions" section which has image promo content. Sample page: /locations/wells-state-park

  2. Check the heading for "Actions" and image promo item's heading titles for their heading numbers.

  • The heading number for Action (compHeading) matches to other compHeading's in the main content column such as Overview, Hours, Accessibilities, and etc. In this case, 3.
  • The heading number for the image promo items is the heading number for compHeading + 1, which is 4, not the template default value of 2.

Screenshots

dp-3222_image-promo-item

Additional Notes:

Anything else to add?

Impacted Areas in Application

@todo

Today I learned...

…om compHeading in @organizms/image-promos.twig
@yriahi yriahi self-requested a review February 22, 2018 19:12
Copy link

@yriahi yriahi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yriahi yriahi merged commit 8d4bf66 into dev Feb 22, 2018
@clairesunstudio clairesunstudio mentioned this pull request Mar 1, 2018
isaacchansky added a commit that referenced this pull request Mar 12, 2018
* dev: (55 commits)
  Dp 6522 create boards and directories patterns (#717)
  fix 'our organizations' and 'mosaic' layouts on IE11 (#723)
  DP-7564  Org Page Mosaic component changes (#722)
  add more verbosity to the pattern lab php command (#704)
  DP-7622  mayflower for information details page (#690)
  add block for expandable section links
  Dp 8000 TOC block for exapandable-sections (#718)
  add all merged pr into release note
  update release note to include adding changelog
  nump up to 5.14.0
  update release note
  Changelog link update (#715)
  DP-7063 Added SVG Chat icon (#664)
  DP-2082 [a11y] Add intuitive infor to the + symbols for accordion buttons (#687)
  patch to Dp 7786 create sort by variant (#712)
  DP-7624 - binder cover page components (#698)
  Dp 7786 create sort by variant (#711)
  Adding changelog process to Mayflower (#708)
  DP-6352: Move floating action to below footer (#678)
  set up to pass on the heading level number to imagePromo item unit from compHeading in @organizms/image-promos.twig (#682)
  ...
@ygannett ygannett deleted the DP-3222_a11y-heading-levels-image-promo branch April 10, 2018 19:26
@ygannett ygannett restored the DP-3222_a11y-heading-levels-image-promo branch April 10, 2018 19:26
@ygannett ygannett deleted the DP-3222_a11y-heading-levels-image-promo branch April 10, 2018 19:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants