Skip to content

Commit

Permalink
support setting <br> in the PDOM as innerHTML, phetsims/friction#158
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jan 26, 2019
1 parent 47cd448 commit 5cc9e4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/accessibility/AccessibilityUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ define( function( require ) {
var INS_TAG = 'INS';
var SUB_TAG = 'SUB';
var SUP_TAG = 'SUP';
var BR_TAG = 'BR';

// These browser tags are a definition of default focusable elements, converted from Javascript types,
// see https://stackoverflow.com/questions/1599660/which-html-elements-can-receive-focus
var DEFAULT_FOCUSABLE_TAGS = [ A_TAG, AREA_TAG, INPUT_TAG, SELECT_TAG, TEXTAREA_TAG, BUTTON_TAG, IFRAME_TAG ];

// collection of tags that are used for formatting text
var FORMATTING_TAGS = [ BOLD_TAG, STRONG_TAG, I_TAG, EM_TAG, MARK_TAG, SMALL_TAG, DEL_TAG, INS_TAG, SUB_TAG, SUP_TAG ];
var FORMATTING_TAGS = [ BOLD_TAG, STRONG_TAG, I_TAG, EM_TAG, MARK_TAG, SMALL_TAG, DEL_TAG, INS_TAG, SUB_TAG,
SUP_TAG, BR_TAG ];

// these elements do not have a closing tag, so they won't support features like innerHTML. This is how PhET treats
// these elements, not necessary what is legal html.
Expand Down

0 comments on commit 5cc9e4b

Please sign in to comment.