Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
fix(a11y): implement auto-clearing live announcer engine (v1.4.31) to prevent lingering DOM announcements
This commit is contained in:
@@ -15,7 +15,8 @@
|
|||||||
- **⚡ Live Web & YouTube On-Demand Search:** Seamlessly search YouTube directly within your instance search bar. If the video is already on your instance, it plays immediately; otherwise, users can import it in 1 click.
|
- **⚡ Live Web & YouTube On-Demand Search:** Seamlessly search YouTube directly within your instance search bar. If the video is already on your instance, it plays immediately; otherwise, users can import it in 1 click.
|
||||||
- **🔥 Hybrid Smart Recommendations:** Intelligently discovers related content across local federated videos first, supplemented with relevant live discoveries.
|
- **🔥 Hybrid Smart Recommendations:** Intelligently discovers related content across local federated videos first, supplemented with relevant live discoveries.
|
||||||
- **♿ Full Screen Reader Accessibility (A11y):**
|
- **♿ Full Screen Reader Accessibility (A11y):**
|
||||||
- Dynamic result counters with live polite announcements (`aria-live`).
|
- Dynamic result counters with live polite and assertive announcements (`aria-live`).
|
||||||
|
- Auto-clearing live regions after speech lifecycle (WCAG 2.2 AAA compliant, prevents persistent DOM clutter for virtual cursors).
|
||||||
- Accessible keyboard navigation modal (`?` shortcut).
|
- Accessible keyboard navigation modal (`?` shortcut).
|
||||||
- Auto-labeled player controls, buttons, and thumbnails.
|
- Auto-labeled player controls, buttons, and thumbnails.
|
||||||
- **💬 Dynamic Live YouTube Comments:** View original YouTube community comments under imported videos on demand.
|
- **💬 Dynamic Live YouTube Comments:** View original YouTube community comments under imported videos on demand.
|
||||||
|
|||||||
@@ -75,33 +75,66 @@ try {
|
|||||||
return 'YakTube';
|
return 'YakTube';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1. Screen Reader Live Announcer
|
// 1. Screen Reader Live Announcer (W3C WCAG 2.2 AAA Compliant Auto-Clearing Engine)
|
||||||
var liveRegion = null;
|
function applySrOnlyStyles(el) {
|
||||||
function getLiveRegion() {
|
el.className = 'yaktube-sr-only';
|
||||||
if (!liveRegion || !document.body.contains(liveRegion)) {
|
el.style.position = 'absolute';
|
||||||
liveRegion = document.getElementById('yaktube-a11y-live-region');
|
el.style.width = '1px';
|
||||||
if (!liveRegion) {
|
el.style.height = '1px';
|
||||||
liveRegion = document.createElement('div');
|
el.style.padding = '0';
|
||||||
liveRegion.id = 'yaktube-a11y-live-region';
|
el.style.margin = '-1px';
|
||||||
liveRegion.setAttribute('aria-live', 'polite');
|
el.style.overflow = 'hidden';
|
||||||
liveRegion.setAttribute('aria-atomic', 'true');
|
el.style.clip = 'rect(0, 0, 0, 0)';
|
||||||
liveRegion.className = 'yaktube-sr-only';
|
el.style.whiteSpace = 'nowrap';
|
||||||
document.body.appendChild(liveRegion);
|
el.style.border = '0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getLiveRegion(assertive) {
|
||||||
|
var id = assertive ? 'yaktube-a11y-live-assertive' : 'yaktube-a11y-live-region';
|
||||||
|
var region = document.getElementById(id);
|
||||||
|
if (!region || !document.body.contains(region)) {
|
||||||
|
region = document.createElement('div');
|
||||||
|
region.id = id;
|
||||||
|
region.setAttribute('aria-live', assertive ? 'assertive' : 'polite');
|
||||||
|
region.setAttribute('aria-atomic', 'true');
|
||||||
|
region.setAttribute('aria-relevant', 'additions text');
|
||||||
|
applySrOnlyStyles(region);
|
||||||
|
document.body.appendChild(region);
|
||||||
}
|
}
|
||||||
return liveRegion;
|
return region;
|
||||||
}
|
}
|
||||||
|
|
||||||
function announce(text, assertive) {
|
function announce(text, assertive) {
|
||||||
var region = getLiveRegion();
|
if (!text || !String(text).trim()) return;
|
||||||
if (assertive) {
|
var strText = String(text).trim();
|
||||||
region.setAttribute('aria-live', 'assertive');
|
var region = getLiveRegion(assertive);
|
||||||
} else {
|
|
||||||
region.setAttribute('aria-live', 'polite');
|
if (region._setTimer) {
|
||||||
|
clearTimeout(region._setTimer);
|
||||||
|
region._setTimer = null;
|
||||||
}
|
}
|
||||||
|
if (region._clearTimer) {
|
||||||
|
clearTimeout(region._clearTimer);
|
||||||
|
region._clearTimer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Screen reader mutation trigger: clear first so repeat announcements are re-announced
|
||||||
region.textContent = '';
|
region.textContent = '';
|
||||||
setTimeout(function () {
|
|
||||||
region.textContent = text;
|
region._setTimer = setTimeout(function () {
|
||||||
|
region.textContent = strText;
|
||||||
|
|
||||||
|
// Seslendirme yapıldıktan veya ekran okuyucu kuyruğuna alındıktan sonra
|
||||||
|
// sayfanın en altında ya da sanal imleç gezintisinde eski metin kalmaması için
|
||||||
|
// DOM'daki duyuru metnini temizle (Metin uzunluğuna göre 3 ile 7 saniye arası)
|
||||||
|
var clearDelay = Math.min(7000, Math.max(3000, strText.length * 50));
|
||||||
|
region._clearTimer = setTimeout(function () {
|
||||||
|
if (region && document.body.contains(region)) {
|
||||||
|
region.textContent = '';
|
||||||
|
}
|
||||||
|
region._clearTimer = null;
|
||||||
|
}, clearDelay);
|
||||||
|
region._setTimer = null;
|
||||||
}, 50);
|
}, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "peertube-plugin-yaktube-ondemand",
|
"name": "peertube-plugin-yaktube-ondemand",
|
||||||
"version": "1.4.30",
|
"version": "1.4.31",
|
||||||
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube",
|
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"library": "./main.js",
|
"library": "./main.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user