Skip to content

Commit 9f43821

Browse files
authored
Merge pull request #7248 from magento-gl/gl_pr_accessibility_release244_nov23_2021
GL PR for Accessibility Release244 raised on Nov23, 2021
2 parents 203a44f + 5c18277 commit 9f43821

File tree

25 files changed

+81
-48
lines changed

25 files changed

+81
-48
lines changed

app/code/Magento/Backend/Block/Store/Switcher.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Switcher extends \Magento\Backend\Block\Template
2020
/**
2121
* URL for store switcher hint
2222
*/
23-
const HINT_URL = 'https://docs.magento.com/user-guide/configuration/scope.html';
23+
public const HINT_URL = 'https://docs.magento.com/user-guide/configuration/scope.html';
2424

2525
/**
2626
* Name of website variable
@@ -68,22 +68,16 @@ class Switcher extends \Magento\Backend\Block\Template
6868
protected $_template = 'Magento_Backend::store/switcher.phtml';
6969

7070
/**
71-
* Website factory
72-
*
7371
* @var \Magento\Store\Model\WebsiteFactory
7472
*/
7573
protected $_websiteFactory;
7674

7775
/**
78-
* Store Group Factory
79-
*
8076
* @var \Magento\Store\Model\GroupFactory
8177
*/
8278
protected $_storeGroupFactory;
8379

8480
/**
85-
* Store Factory
86-
*
8781
* @var \Magento\Store\Model\StoreFactory
8882
*/
8983
protected $_storeFactory;
@@ -617,9 +611,9 @@ public function getHintHtml()
617611
$url = $this->getHintUrl();
618612
if ($url) {
619613
$html = '<div class="admin__field-tooltip tooltip"><a href="%s" onclick="this.target=\'_blank\'" title="%s"
620-
class="admin__field-tooltip-action action-help"><span>%s</span></a></span></div>';
621-
$title = $this->escapeHtmlAttr(__('What is this?'));
622-
$span= $this->escapeHtml(__('What is this?'));
614+
class="admin__field-tooltip-action action-help"><span>%s</span></a></div>';
615+
$title = $this->escapeHtmlAttr(__('What is this?'));
616+
$span = $this->escapeHtml(__('What is this?'));
623617
$html = sprintf($html, $this->escapeUrl($url), $title, $span);
624618
}
625619
return $html;

app/code/Magento/Backend/Block/Widget/Button/SplitButton.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,12 @@ public function getToggleAttributesHtml()
164164
if ($disabled) {
165165
$classes[] = $disabled;
166166
}
167-
168-
$attributes = ['title' => $title, 'class' => join(' ', $classes), 'disabled' => $disabled];
167+
$attributes = [
168+
'title' => $title,
169+
'class' => join(' ', $classes),
170+
'disabled' => $disabled,
171+
'aria-label' => (string)$this->getData('dropdown_button_aria_label'),
172+
];
169173
$this->_getDataAttributes(['mage-init' => '{"dropdown": {}}', 'toggle' => 'dropdown'], $attributes);
170174

171175
$html = $this->_getAttributesString($attributes);

app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,7 @@ $numColumns = count($block->getColumns());
102102
selected="selected"<?php endif; ?>>200
103103
</option>
104104
</select>
105-
<label for="<?= $block->escapeHtml($block->getHtmlId())
106-
?><?= $block->escapeHtml($block->getHtmlId()) ?>_page-limit"
105+
<label for="<?= $block->escapeHtml($block->getHtmlId()) ?>_page-limit"
107106
class="admin__control-support-text"><?= $block->escapeHtml(__('per page')) ?></label>
108107

109108
<div class="admin__data-grid-pager">

app/code/Magento/Catalog/Block/Adminhtml/Product.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ protected function _prepareLayout()
5959
'button_class' => '',
6060
'class_name' => \Magento\Backend\Block\Widget\Button\SplitButton::class,
6161
'options' => $this->_getAddProductButtonOptions(),
62+
'dropdown_button_aria_label' => __('Add product of type'),
6263
];
6364
$this->buttonList->add('add_new', $addButtonProps);
6465

app/code/Magento/Catalog/Ui/Component/Listing/Columns/ProductActions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function prepareDataSource(array $dataSource)
5858
'catalog/product/edit',
5959
['id' => $item['entity_id'], 'store' => $storeId]
6060
),
61+
'ariaLabel' => __('Edit ') . $item['name'],
6162
'label' => __('Edit'),
6263
'hidden' => false,
6364
];

app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@
202202
</argument>
203203
<settings>
204204
<label translate="true">Description</label>
205+
<notice translate="true">Note: Keyboard shortcut to activate editor help : Alt + 0 (Windows) or &#x2325;0 (MacOS)</notice>
205206
<dataScope>description</dataScope>
206207
</settings>
207208
<formElements>

app/code/Magento/Cms/Block/Adminhtml/Block/Edit/SaveButton.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
99
use Magento\Ui\Component\Control\Container;
1010

11-
/**
12-
* Class SaveButton
13-
* @package Magento\Customer\Block\Adminhtml\Edit
14-
*/
1511
class SaveButton extends GenericButton implements ButtonProviderInterface
1612
{
1713
/**
14+
* Get button data
15+
*
1816
* @return array
1917
*/
2018
public function getButtonData()
@@ -42,6 +40,7 @@ public function getButtonData()
4240
],
4341
'class_name' => Container::SPLIT_BUTTON,
4442
'options' => $this->getOptions(),
43+
'dropdown_button_aria_label' => __('Save options'),
4544
];
4645
}
4746

app/code/Magento/Cms/Block/Adminhtml/Page/Edit/SaveButton.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
99
use Magento\Ui\Component\Control\Container;
1010

11-
/**
12-
* Class SaveButton
13-
* @package Magento\Customer\Block\Adminhtml\Edit
14-
*/
1511
class SaveButton extends GenericButton implements ButtonProviderInterface
1612
{
1713
/**
14+
* Get button data
15+
*
1816
* @return array
1917
*/
2018
public function getButtonData()
@@ -40,6 +38,7 @@ public function getButtonData()
4038
'class_name' => Container::SPLIT_BUTTON,
4139
'options' => $this->getOptions(),
4240
'sort_order' => 90,
41+
'dropdown_button_aria_label' => __('Save options'),
4342
];
4443
}
4544

app/code/Magento/Cms/view/adminhtml/ui_component/cms_page_form.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<dataScope>content_heading</dataScope>
115115
</settings>
116116
</field>
117-
<field name="content" formElement="wysiwyg">
117+
<field name="content" template="ui/form/field" formElement="wysiwyg">
118118
<argument name="data" xsi:type="array">
119119
<item name="config" xsi:type="array">
120120
<item name="source" xsi:type="string">page</item>
@@ -125,6 +125,7 @@
125125
<class name="admin__field-wide">true</class>
126126
</additionalClasses>
127127
<label/>
128+
<notice translate="true">Note: Keyboard shortcut to activate editor help : Alt + 0 (Windows) or &#x2325;0 (MacOS)</notice>
128129
<dataScope>content</dataScope>
129130
</settings>
130131
<formElements>

app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
use Magento\Catalog\Block\Adminhtml\Product\Edit\Button\Generic;
1010
use Magento\ConfigurableProduct\Model\Product\Type\Configurable as ConfigurableType;
1111

12-
/**
13-
* Class Save
14-
*/
1512
class Save extends Generic
1613
{
1714
/**
@@ -43,6 +40,7 @@ public function getButtonData()
4340
],
4441
'class_name' => Container::SPLIT_BUTTON,
4542
'options' => $this->getOptions(),
43+
'dropdown_button_aria_label' => __('Save options'),
4644
];
4745
}
4846

0 commit comments

Comments
 (0)