Skip to content
Okaapiأوكابي
Framework for the code
Theme
Okaapi on GitHub

Chapter 01 Start

Accessibility statement

Okaapi is built so that everyone can use what is made with it: with a keyboard, a screen reader, high contrast, zoom or a small phone, in Arabic and in English. This page says what we aim for, how we check it, and what is not done yet.

WCAG 2.2, criterion by criterion

  • 38 supported
  • 10 depend on your app
  • 7 do not apply
See what we support and what we don’t

اقرأ هذا البيان بالعربية

What we aim for

  • Every component meets the Web Content Accessibility Guidelines (WCAG) 2.2 at level AA, in light and dark, left to right and right to left.
  • Text goes further than AA: it reaches 7:1 contrast against its background in both themes (level AAA). Borders, focus rings and controls reach 3:1.
  • Colour never carries meaning alone, every control works with the keyboard alone, and focus is always visible.
  • Each component follows the matching WAI-ARIA Authoring Practices pattern, or uses the native HTML element when one exists. Each component page lists its keys and what screen readers hear, under Keyboard and screen readers. Angular components are built on the Angular CDK.
  • Touch targets are at least 24 by 24 pixels, the WCAG 2.2 minimum, and buttons and fields are 44 pixels tall or more.
  • The words components say on their own, such as Close and the names of page buttons, come in Arabic and English, switched in one place.
  • Motion stops when the system asks for reduced motion, and every control keeps its edges and states in Windows high contrast. When the system asks for more contrast, borders and secondary text go to full text strength.

How we check it

Every check below runs on every push, and any failure stops it.

  • A contrast test measures every colour pair of both themes against its target.
  • axe-core checks every page of this site in light and dark, the component pages also in the React, Vue and HTML views, and again with dialogs, menus, popovers, tooltips and toasts open.
  • Every page is loaded with text at 200%, with the WCAG text spacing override, and at 320 pixels wide; none of them may push the page sideways.
  • Browser tests press the keys of the interactive components, left to right and right to left, in Chromium, Firefox and WebKit. The live demos on this site are the Angular components.
  • Unit tests in Angular, React and Vue check every component's roles, names and states, the keys of the interactive ones, and the Arabic words they say. The React and Vue tests run again in real Chromium.
  • Screenshots of the main controls in Windows high contrast are compared with approved ones, and the more contrast setting is checked.

By hand, before each release: a walk through with the keyboard only.

Not done yet

  • Testing with real screen readers: NVDA and JAWS on Windows, VoiceOver on macOS and iOS, TalkBack on Android, including Arabic voices. Automated checks catch only part of what a screen reader user meets.
  • React and Vue run their tests in Chromium only; the page-level key tests in Firefox and WebKit run on the Angular components.
  • Tooltips never show on touch screens, so nothing needed may live only in a tooltip.

What stays with your app

A component can only be as accessible as the page around it. Your app still needs to:

  • set lang and dir on the html element, and change them with the language;
  • give each page its own title and one main heading;
  • write text alternatives for its images, and real labels;
  • keep 7:1 for text and 3:1 for borders if it re-brands the colours.

Tell us

If something is hard or impossible to use, please open an issue on GitHub and say which component, which browser, and which assistive technology.

Written on , updated on , and reviewed with every release.

البيان بالعربية

  • 38 مدعومة
  • 10 على تطبيقك
  • 7 لا تنطبق

ما ندعمه وما لا ندعمه، معيارًا معيارًا

صُمّمت مكتبة أوكابي ليستطيع الجميع استخدام ما يُبنى بها: بلوحة المفاتيح، أو بقارئ الشاشة، أو بالتباين العالي، أو بالتكبير، أو على هاتف صغير، بالعربية والإنجليزية.

ما نهدف إليه

  • يلتزم كل مكوّن بإرشادات الوصول إلى محتوى الويب (WCAG 2.2) على المستوى AA، في الوضعين الفاتح والداكن، ومن اليسار إلى اليمين ومن اليمين إلى اليسار.
  • يبلغ تباين النص مع خلفيته 7:1 في الوضعين (المستوى AAA)، وتبلغ الحدود وحلقات التركيز وعناصر التحكم 3:1.
  • لا يحمل اللون وحده أي معنى، وكل عنصر تحكم يعمل بلوحة المفاتيح وحدها، والتركيز ظاهر دائمًا.
  • يتبع كل مكوّن نمط WAI-ARIA المناسب، أو يستخدم عنصر HTML الأصلي حين يوجد. وتعرض صفحة كل مكوّن مفاتيحه وما يسمعه مستخدم قارئ الشاشة.
  • لا تقل مساحة اللمس عن 24 × 24 بكسل، ولا يقل ارتفاع الأزرار والحقول عن 44 بكسل.
  • الكلمات التي تقولها المكوّنات بنفسها، مثل «إغلاق» وأسماء أزرار الصفحات، متاحة بالعربية والإنجليزية، وتُبدَّل من مكان واحد.
  • تتوقف الحركة حين يطلب النظام تقليلها، وتحتفظ عناصر التحكم بحدودها وحالاتها في وضع التباين العالي في ويندوز، ويشتد تباين الحدود والنص الثانوي حين يطلب النظام تباينًا أعلى.

كيف نتحقق

تعمل كل هذه الفحوص مع كل رفع للكود، وأي خطأ يوقفه.

  • يقيس اختبار التباين كل زوج من الألوان في الوضعين.
  • يفحص axe-core كل صفحة من هذا الموقع في الوضعين، وصفحات المكوّنات أيضًا في عرض React وVue وHTML، ثم يفحصها مرة أخرى والنوافذ الحوارية والقوائم والتلميحات والإشعارات مفتوحة.
  • تُفتح كل صفحة بنص مكبّر إلى 200%، وبتباعد النص الذي تحدده WCAG، وبعرض 320 بكسل، ولا يجوز أن تحتاج الصفحة إلى تمرير أفقي.
  • تجرّب اختبارات المتصفح مفاتيح المكوّنات التفاعلية، من اليسار إلى اليمين ومن اليمين إلى اليسار، على Chromium وFirefox وWebKit. والأمثلة الحية في هذا الموقع مبنية بمكوّنات Angular.
  • تفحص اختبارات الوحدة أدوار كل مكوّن وأسماءه وحالاته وكلماته العربية في كل إطار عمل، وتعمل اختبارات React وVue مرة أخرى في Chromium حقيقي.
  • تُقارن صور لعناصر التحكم الأساسية في وضع التباين العالي بصور معتمدة.

ما لم يكتمل بعد

  • مكوّنات React وVue مختبرة في Chromium فقط؛ واختبارات المفاتيح على مستوى الصفحة في Firefox وWebKit تعمل على مكوّنات Angular.
  • الاختبار بقارئات شاشة حقيقية: NVDA وJAWS على ويندوز، وVoiceOver على macOS وiOS، وTalkBack على أندرويد، بما فيها الأصوات العربية.
  • لا تظهر التلميحات على شاشات اللمس، فلا تضع فيها شيئًا لا غنى عنه.

ما يبقى على تطبيقك

  • ضبط lang وdir على عنصر html وتغييرهما مع اللغة؛
  • عنوان خاص لكل صفحة، وعنوان رئيسي واحد فيها؛
  • نص بديل للصور، وتسميات حقيقية للحقول؛
  • الحفاظ على 7:1 للنص و3:1 للحدود إن غيّرت الألوان.

أخبرنا

إن وجدت شيئًا صعب الاستخدام أو مستحيلًا، فافتح مشكلة على GitHub واذكر المكوّن والمتصفح والتقنية المساعدة التي تستخدمها.