Skip to content

Commit e13287b

Browse files
committed
Makes screenreaders read folder names
In order to take advantage of this, all the nodes of the tree must have an aria-label. closes CNVS-17947 Test Plan: - Go to New Files - Using VO go to the folder tree structure - When you follow the directions as read (up/down, etc.) you should be read the names of the folders. - The same should also be true where this same tree is used (outcomes) Change-Id: I04b502fb0d86fc17aa3f9c6b4b7c20d8d03f2885 Reviewed-on: https://gerrit.instructure.com/47483 Reviewed-by: Dan Minkevitch <dan@instructure.com> Tested-by: Jenkins QA-Review: Nathan Rogowski <nathan@instructure.com> Product-Review: Clay Diffrient <cdiffrient@instructure.com>
1 parent 4447333 commit e13287b

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

app/coffeescripts/react_files/components/MoveDialog.coffee

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ define [
6666
render: withReactDOM ->
6767
form { ref: 'form', className: 'form-dialog', onSubmit: preventDefault(@submit)},
6868
div {className: 'form-dialog-content'},
69-
div ref: 'FolderTreeHolder'
69+
aside {
70+
role: 'region'
71+
'aria-label' : I18n.t('folder_browsing_tree', 'Folder Browsing Tree')
72+
},
73+
div ref: 'FolderTreeHolder'
7074
div {className: 'form-controls'},
7175
button {
7276
type: 'button'

app/coffeescripts/views/TreeBrowserView.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ define [
7878
@$tree.find('[role=treeitem]').not($to).attr('aria-selected', false).removeClass(@focusStyleClass)
7979
$to.attr 'aria-selected', true
8080
$to.addClass(@focusStyleClass)
81+
$.screenReaderFlashMessageExclusive($to.attr('aria-label'))
8182
toId = $to.attr 'id'
8283
if not toId
8384
toId = _.uniqueId 'treenode-'

0 commit comments

Comments
 (0)