From 5cc9e4b2ed458648e9aa8f20ce79a1bddbfc4f30 Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 22 Jan 2019 16:29:11 -0900 Subject: [PATCH] support setting
in the PDOM as innerHTML, https://github.com/phetsims/friction/issues/158 --- js/accessibility/AccessibilityUtil.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/accessibility/AccessibilityUtil.js b/js/accessibility/AccessibilityUtil.js index ee298d394..371a11c5e 100644 --- a/js/accessibility/AccessibilityUtil.js +++ b/js/accessibility/AccessibilityUtil.js @@ -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.