Skip to content

Commit

Permalink
add readingBlockContent to iconsBox in labelWithIconList, #711
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Nov 10, 2021
1 parent f048ab3 commit 8cf1965
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js/keyboard/help/KeyboardHelpSection.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,12 @@ class KeyboardHelpSection extends VBox {
spacing: DEFAULT_VERTICAL_ICON_SPACING * 0.75, // less than the normal vertical icon spacing since it is a group
align: 'left',
tagName: 'li',
innerContent: labelInnerContent
innerContent: labelInnerContent,

// voicing
// {string} - Content for this icon that is read by the Voicing feature
// when in a KeyboardHelpSection. If null, will default to the labelInnerContent.
readingBlockContent: null
}, options.iconsVBoxOptions );

const labelText = new RichText( labelString, { font: LABEL_FONT } );
Expand Down Expand Up @@ -305,6 +310,9 @@ class KeyboardHelpSection extends VBox {
const iconsBox = labelIconListGroup.createBox( iconsVBox, groupOptions ); // create the box to match height, but reference not necessary
const labelWithHeightBox = labelIconListGroup.createBox( labelBox, groupOptions );

// set the ReadingBlock content for the icon - default
iconsBox.readingBlockContent = options.iconsVBoxOptions.readingBlockContent || options.iconsVBoxOptions.innerContent;

return new HelpSectionRow( labelText, labelWithHeightBox, iconsBox );
}

Expand Down

0 comments on commit 8cf1965

Please sign in to comment.