[orca/gnome-42] Web: Don't attempt to infer labels for ARIA widgets
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-42] Web: Don't attempt to infer labels for ARIA widgets
- Date: Tue, 17 May 2022 10:51:58 +0000 (UTC)
commit b71379374f07ce1072a5cb35ee890cf59f1a52b4
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Apr 20 13:59:36 2022 +0200
Web: Don't attempt to infer labels for ARIA widgets
Authors using ARIA are expected to provide names for their widgets,
and typically do. However, when they don't, and we try to infer what
might be the label based on surrounding text, we sometimes wind up
duplicating a string the author plans to present some other way.
And label inference is not especially performant. So only do the work
for native HTML widgets which lack an accessible name.
src/orca/scripts/web/script_utilities.py | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 56c505721..a972d6f4f 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4344,6 +4344,8 @@ class Utilities(script_utilities.Utilities):
else:
if name:
rv = False
+ elif self._getXMLRoles(obj):
+ rv = False
elif not rv:
roles = [pyatspi.ROLE_CHECK_BOX,
pyatspi.ROLE_COMBO_BOX,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]