Skip to content

Commit b69395d

Browse files
committed
Add the aria-disabled attribute to Inventory panel links that do not perform any actions
1 parent 011f15c commit b69395d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
- Added: Customizable announcement choice button updates using assistive technology.
6565
- Added: Customizable announcement description using assistive technology when pressing a hotkey (see help in menu).
6666
- Added: Customizable announcement description using assistive technology when shaking device (see help in menu).
67+
- Added: Inventory panel links that do not perform any actions have the aria-disabled attribute, which indicates that there is no associated action but does not suppress the element focusability.
6768
- Added: Designation for assistive technologies whether an inventory item has a drop-down list.
6869
- Changed: Each link in the drop-down menu of an inventory item has the role of a list item.
6970
- Changed: Text labels for player graphic icons.

js/Client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Client.prototype.drawInventory = function () {
279279
if (this.crtlInventory.find('> li').length == 0) {
280280
// For empty element set UrqW UI language, not game language
281281
var lang = document.getElementsByTagName('HTML')[0].getAttribute('lang');
282-
this.crtlInventory.append('<li lang=' + lang + '><a href="#" class="item_use">' + i18next.t('empty') + '</a></li>');
282+
this.crtlInventory.append('<li lang=' + lang + '><a href="#" class="item_use" aria-disabled="true">' + i18next.t('empty') + '</a></li>');
283283
}
284284
};
285285

@@ -320,7 +320,7 @@ Client.prototype.drawItem = function (itemName, quantity) {
320320
itemDisplayName = itemDisplayName + ' (' + quantity + ')';
321321
}
322322

323-
return '<li><a href="#" class="item_use">' + itemDisplayName + '</a></li>';
323+
return '<li><a href="#" class="item_use" aria-disabled="true">' + itemDisplayName + '</a></li>';
324324
} if (actions.length == 1 && itemName != 'inv' && actions[0][0] == '') {
325325
if (quantity > 1) {
326326
itemDisplayName = itemDisplayName + ' (' + quantity + ')';

md/ru/other/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
- Добавлено: Настраиваемое объявление обновления кнопок выбора с помощью вспомогательных технологий.
6565
- Добавлено: Настраиваемое объявление описания с помощью вспомогательных технологий при нажатии горячей клавиши (см. справку в меню).
6666
- Добавлено: Настраиваемое объявление описания с помощью вспомогательных технологий при встряхивании устройства.
67+
- Добавлено: Ссылки на панели инвентаря, не выполняющие никаких действий, имеют атрибут aria-disabled, который информирует об отсутствии связанных действий, но не подавляет фокусируемость элемента.
6768
- Добавлено: Обозначение для вспомогательных технологий наличия выпадающего списка у элемента инвентаря.
6869
- Изменено: Каждая ссылка в выпадающем меню элемента инвентаря имеет роль элемента списка.
6970
- Изменено: Текстовые метки у графических иконок плеера.

0 commit comments

Comments
 (0)