Skip to content
Snippets Groups Projects
Unverified Commit ee1d6672 authored by Alex Pott's avatar Alex Pott
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment