Skip to content

Commit a1789ff

Browse files
authored
Merge pull request #45 from MewenLeHo/main-mlh-miscellaneaous-fixes
Miscellaneaous fixes
2 parents f05ad85 + c80b865 commit a1789ff

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file. This projec
44

55
## [Unreleased]
66

7-
### Changed
7+
## [1.3.5] – 2025-10-12
8+
9+
### Fixed
10+
- **Accessibility Improvements**: Enhanced support for keyboard navigation and ARIA implementation, improving accessibility for screen readers.
11+
- **UI Glitches**: Improve color contrasts.
12+
- **Performance Optimizations**: Fix an issue with CSS cleaning after closing the panel.
813
- **Demo update**: Improve the demo by preventing the script from being loaded multiple times.
914

1015
## [1.3.4] – 2025-09-20

detectAutocomplete.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ javascript: (function () {
121121

122122
// Styles
123123
const style = document.createElement('style');
124+
style.id = 'ac-styles';
124125
style.textContent = `
125126
.ac-panel {
126127
position: fixed;
@@ -1106,6 +1107,8 @@ javascript: (function () {
11061107
panel.setAttribute('role', 'dialog');
11071108
panel.setAttribute('aria-modal', 'true');
11081109
panel.setAttribute('aria-labelledby', 'ac-panel-title');
1110+
panel.setAttribute('aria-live', 'polite');
1111+
panel.setAttribute('aria-keyshortcuts', 'Escape');
11091112
panel.innerHTML = `
11101113
<p id="ac-panel-title">${messages.ui.panelTitle}</p>
11111114
<div class="ac-stats">

docs/index.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
.note {
6262
font-size: 0.9em;
63-
color: #666;
63+
color: #333;
6464
margin-top: 1rem;
6565
}
6666

@@ -173,12 +173,15 @@ <h1><span aria-hidden="true">🔍</span> Autocomplete Attribute Audit - Demo</h1
173173

174174
function runAudit() {
175175
// Prevent adding the script multiple times
176-
if (!document.getElementById('ac-script')) {
177-
const script = document.createElement("script");
178-
script.id = "ac-script";
179-
script.src = "https://cdn.jsdelivr.net/gh/MewenLeHo/detectAutocomplete@main/detectAutocomplete.min.js";
180-
document.body.appendChild(script);
176+
const existingScript = document.getElementById('ac-script');
177+
if (existingScript) {
178+
existingScript.remove();
181179
}
180+
181+
const script = document.createElement("script");
182+
script.id = "ac-script";
183+
script.src = "https://cdn.jsdelivr.net/gh/MewenLeHo/detectAutocomplete@main/detectAutocomplete.min.js";
184+
document.body.appendChild(script);
182185
}
183186
</script>
184187

0 commit comments

Comments
 (0)