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:
@@ -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...');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user