aria-api

access ARIA information from JavaScript
git clone https://git.ce9e.org/aria-api.git

commit
233ecd417add6de0975ae844b5fcb3017e6a7a54
parent
29942bc0d480da4801b902873b2f043d66d21adc
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-06-22 19:05
name; lower priority of placeholder

Diffstat

M lib/name.js 5 +----

1 files changed, 1 insertions, 4 deletions


diff --git a/lib/name.js b/lib/name.js

@@ -118,9 +118,6 @@ const getName = function(el, recursive, visited, directReference) {
  118   118 		ret = strings.join(' ');
  119   119 	}
  120   120 	if (!ret.trim()) {
  121    -1 		ret = el.placeholder || '';
  122    -1 	}
  123    -1 	if (!ret.trim()) {
  124   121 		ret = el.alt || '';
  125   122 	}
  126   123 	if (!ret.trim() && el.matches('abbr,acronym') && el.title) {
@@ -170,7 +167,7 @@ const getName = function(el, recursive, visited, directReference) {
  170   167 	// I
  171   168 	// FIXME: presentation not mentioned in the spec
  172   169 	if (!ret.trim() && (directReference || !query.matches(el, 'presentation'))) {
  173    -1 		ret = el.title || '';
   -1   170 		ret = el.title || el.placeholder || '';
  174   171 	}
  175   172 
  176   173 	// FIXME: not exactly sure about this, but it reduces the number of failing