aria-api

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

commit
6177f20ae6ca5c8d4d8b77055649ad3fe760b723
parent
de7035e0217f982263e4df6d8f43aedc98d55fd0
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2024-06-21 15:51
do not trim &nbsp;

Diffstat

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

1 files changed, 4 insertions, 1 deletions


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

@@ -170,7 +170,10 @@ const getName = function(el, recursive, visited, directReference) {
  170   170 };
  171   171 
  172   172 const getNameTrimmed = function(el) {
  173    -1 	return getName(el).replace(/\s+/g, ' ').trim();
   -1   173 	return getName(el)
   -1   174 		.replace(/[ \n\r\t\f]+/g, ' ')
   -1   175 		.replace(/^ /, '')
   -1   176 		.replace(/ $/, '');
  174   177 };
  175   178 
  176   179 const getDescription = function(el) {