Commit ee1d6672 authored by alexpott's avatar alexpott

Issue #3040645 by mark_fullmer, tim.plunkett, porkloin, xjm, andrewmacpherson,...

Issue #3040645 by mark_fullmer, tim.plunkett, porkloin, xjm, andrewmacpherson, mgifford: Add a role=region wrapper to the Layout Builder action form to fix screen reader navigation barriers
parent 00b3590a
......@@ -159,6 +159,8 @@ public function getEntityFromRouteMatch(RouteMatchInterface $route_match, $entit
*/
protected function actions(array $form, FormStateInterface $form_state) {
$actions = parent::actions($form, $form_state);
$actions['#attributes']['role'] = 'region';
$actions['#attributes']['aria-label'] = $this->t('Layout Builder tools');
$actions['submit']['#value'] = $this->t('Save layout');
$actions['#weight'] = -1000;
......
......@@ -186,6 +186,8 @@ public function save(array $form, FormStateInterface $form_state) {
*/
protected function actions(array $form, FormStateInterface $form_state) {
$actions = parent::actions($form, $form_state);
$actions['#attributes']['role'] = 'region';
$actions['#attributes']['aria-label'] = $this->t('Layout Builder tools');
$actions['submit']['#value'] = $this->t('Save layout');
$actions['delete']['#access'] = FALSE;
$actions['#weight'] = -1000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment