1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-19 06:06:54 +00:00

perf(ui): improve web accessibility (#447)

- Make color and contrast meets WCAG 2 AA and above
- Fixes `aria-label` on button "copy link" in posts
This commit is contained in:
Cotes Chung
2023-08-02 05:18:35 +08:00
parent 0fd4c0bd0f
commit 37c976499e
10 changed files with 96 additions and 84 deletions

View File

@@ -99,7 +99,9 @@ export function initClipboard() {
/* --- Post link sharing --- */
$('#copy-link').on('click', (e) => {
const btnCopyLink = $('#copy-link');
btnCopyLink.on('click', (e) => {
let target = $(e.target);
if (isLocked(target)) {
@@ -120,4 +122,10 @@ export function initClipboard() {
}, TIMEOUT);
});
});
btnCopyLink.on('mouseleave', function (e) {
const target = $(e.target);
target.tooltip('hide');
console.log('mouse leave...');
});
}