सुलभता पैटर्न · डेटा प्रदर्शन

कानबान बोर्ड

खींचना कार्ड ले जाने का एक तरीका है, अकेला तरीका कभी नहीं: हर कार्ड पर एक ले जाएँ मेन्यू है जो एक क्लिक या टैप से चलता है, और एक हैंडल है जिसे कीबोर्ड से उठाकर, ऐरो कुंजियों से ले जाकर, रखा जा सकता है। हर बदलाव कार्ड, उसके कॉलम और उसमें उसकी जगह के साथ बताया जाता है, कार्ड जहाँ भी जाए फ़ोकस उसी पर रहता है, और कॉलम की गिनती साथ-साथ बदलती है।

डब्ल्यूसीएजी मानदंड
7
कीबोर्ड नियम
7
जाँच का तरीक़ा
axe, कीबोर्ड और इंस्पेक्टर

लाइव डेमो

आज़माएँ

इसे माउस, कीबोर्ड या स्क्रीन रीडर से इस्तेमाल करें। साथ का इंस्पेक्टर दिखाता है कि आपके इस्तेमाल के दौरान ब्राउज़र सहायक तकनीक को क्या बताता है: फ़ोकस, स्थिति में बदलाव और घोषणाएँ।

रिलीज़ 2.4

कार्ड खींचें, या उसका ले जाएँ मेन्यू इस्तेमाल करें। कीबोर्ड से, कार्ड के हैंडल पर Space दबाएँ, ऐरो कुंजियों से उसे ले जाएँ और रखने के लिए फिर से Space दबाएँ; Escape उसे वापस रख देता है।

करना है

  • हिंदी स्ट्रिंग अपडेट करें

    सामग्री 9 अक्टू॰ तक
  • रंग कंट्रास्ट की जाँच

    सुलभता 12 अक्टू॰ तक

जारी है

  • चेकआउट का फ़ोकस क्रम ठीक करें

    बग 7 अक्टू॰ तक
  • डिज़ाइन समीक्षा

    डिज़ाइन 8 अक्टू॰ तक
  • रिलीज़ नोट्स लिखें

    लेखन 10 अक्टू॰ तक

हो गया

  • एरर ट्रैकिंग सेट करें

    इंजीनियरिंग 2 अक्टू॰ को पूरा
  • डार्क थीम जारी करें

    डिज़ाइन 5 अक्टू॰ को पूरा

जावास्क्रिप्ट के बिना डेमो उतना ही काम करता है जितना उसका एचटीएमएल; इंस्पेक्टर के लिए जावास्क्रिप्ट चाहिए।

कीबोर्ड

जिन कुंजियों पर यह काम करता है

हर क्रिया पॉइंटर के बिना काम करती है।

कुंजीयह क्या करती है
Tabकॉलम-दर-कॉलम, हर कार्ड के हैंडल और ले जाएँ बटन से होकर गुज़रता है।
SpaceयाEnterहैंडल पर, कार्ड उठाता है; फिर से दबाने पर, उसे वहीं रख देता है जहाँ वह है।
Arrow UpयाArrow Downकार्ड उठा हुआ हो तो उसे अपने कॉलम में ऊपर या नीचे ले जाता है।
Arrow LeftयाArrow Rightकार्ड उठा हुआ हो तो उसे पिछले या अगले कॉलम में ले जाता है, और जहाँ हो सके उसकी जगह बनाए रखता है।
Escapeकार्ड उठा हुआ या खींचा जा रहा हो तो उसे वहीं वापस रख देता है जहाँ से शुरू हुआ था। ले जाएँ मेन्यू में, मेन्यू बंद करता है।
EnterयाSpaceयाArrow Downले जाएँ पर, मेन्यू खोलता है; Arrow Up और Arrow Down उसमें चलते हैं, Home और End उसके सिरों पर पहुँचाते हैं।
EnterयाSpaceमेन्यू में, कार्ड को उस कॉलम में, या ऊपर या नीचे ले जाता है, और फ़ोकस कार्ड के ले जाएँ बटन पर लौटाता है।

स्क्रीन रीडर

यह क्या घोषित करता है

मार्कअप की भूमिकाओं, नामों और स्थितियों से लिखा गया।

कबअपेक्षित घोषणा
फ़ोकस किसी हैंडल पर पहुँचता हैउठाएँ: डिज़ाइन समीक्षा, टॉगल बटन, दबा हुआ नहीं। कार्ड खींचें, या उसका ले जाएँ मेन्यू इस्तेमाल करें…
Space उसे उठाता हैदबा हुआ। डिज़ाइन समीक्षा उठाया गया। जारी है, 3 में से स्थान 2।
Arrow Right उसे ले जाता हैडिज़ाइन समीक्षा। हो गया, 3 में से स्थान 2।
Space उसे रख देता हैदबा हुआ नहीं। डिज़ाइन समीक्षा रखा गया। हो गया, 3 में से स्थान 2।
इसकी जगह Escapeरद्द किया गया। डिज़ाइन समीक्षा वापस जारी है में है, 3 में से स्थान 2।
ले जाएँ मेन्यू में हो गया चुना जाता हैडिज़ाइन समीक्षा को हो गया में ले जाया गया, 3 में से स्थान 3। ले जाएँ: डिज़ाइन समीक्षा, मेन्यू बटन

ये अपेक्षित घोषणाएँ हैं, रिकॉर्डिंग नहीं। स्क्रीन रीडर और ब्राउज़र के हिसाब से शब्द और क्रम बदलते हैं।

कोड

कोड कॉपी करें

वही फ़ाइलें जिन पर यह डेमो चलता है। स्टाइल एक प्रीफ़िक्स के साथ परोसी जाती हैं जो इस साइट की अपनी स्टाइल को डेमो से दूर रखता है; आप जो कॉपी करते हैं वह मूल है।

मार्कअप

<div class="ap-kanban" data-ap-kanban>
  <div class="ap-kanban__top">
    <h3 class="ap-kanban__board-name">Release 2.4</h3>
    <p class="ap-kanban__keys" id="kanban-keys">Drag a card, or use its Move menu. With the keyboard, press Space on a card's handle, move it with the arrow keys and press Space again to drop it; Escape puts it back.</p>
  </div>

  <div class="ap-kanban__board">
    <div class="ap-kanban__col" data-ap-col="todo">
      <div class="ap-kanban__head">
        <h4 class="ap-kanban__name" id="kanban-todo">To do</h4>
        <span class="ap-kanban__tally" aria-hidden="true" data-ap-tally>2</span>
      </div>
      <ul class="ap-kanban__cards" aria-labelledby="kanban-todo" data-ap-cards>
        <li class="ap-kanban__card" data-ap-task="hindi">
          <button type="button" class="ap-kanban__grip" aria-label="Pick up Update Hindi strings" aria-pressed="false" aria-describedby="kanban-keys">
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></svg>
          </button>
          <p class="ap-kanban__what">Update Hindi strings</p>
          <span class="ap-kanban__tag" data-tone="info">Content</span>
          <span class="ap-kanban__due">Due 9 Oct</span>
          <button type="button" class="ap-kanban__move" id="kanban-move-hindi" aria-label="Move Update Hindi strings" aria-haspopup="menu" aria-expanded="false" aria-controls="kanban-menu">
            Move
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m6 9 6 6 6-6"/></svg>
          </button>
        </li>
        <li class="ap-kanban__card" data-ap-task="contrast">
          <button type="button" class="ap-kanban__grip" aria-label="Pick up Audit color contrast" aria-pressed="false" aria-describedby="kanban-keys">
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></svg>
          </button>
          <p class="ap-kanban__what">Audit color contrast</p>
          <span class="ap-kanban__tag" data-tone="success">Accessibility</span>
          <span class="ap-kanban__due">Due 12 Oct</span>
          <button type="button" class="ap-kanban__move" id="kanban-move-contrast" aria-label="Move Audit color contrast" aria-haspopup="menu" aria-expanded="false" aria-controls="kanban-menu">
            Move
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m6 9 6 6 6-6"/></svg>
          </button>
        </li>
      </ul>
      <p class="ap-kanban__blank" data-ap-blank hidden>No cards here yet.</p>
    </div>
    <div class="ap-kanban__col" data-ap-col="doing">
      <div class="ap-kanban__head">
        <h4 class="ap-kanban__name" id="kanban-doing">In progress</h4>
        <span class="ap-kanban__tally" aria-hidden="true" data-ap-tally>3</span>
      </div>
      <ul class="ap-kanban__cards" aria-labelledby="kanban-doing" data-ap-cards>
        <li class="ap-kanban__card" data-ap-task="focus">
          <button type="button" class="ap-kanban__grip" aria-label="Pick up Fix checkout focus order" aria-pressed="false" aria-describedby="kanban-keys">
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></svg>
          </button>
          <p class="ap-kanban__what">Fix checkout focus order</p>
          <span class="ap-kanban__tag" data-tone="danger">Bug</span>
          <span class="ap-kanban__due">Due 7 Oct</span>
          <button type="button" class="ap-kanban__move" id="kanban-move-focus" aria-label="Move Fix checkout focus order" aria-haspopup="menu" aria-expanded="false" aria-controls="kanban-menu">
            Move
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m6 9 6 6 6-6"/></svg>
          </button>
        </li>
        <li class="ap-kanban__card" data-ap-task="review">
          <button type="button" class="ap-kanban__grip" aria-label="Pick up Design review" aria-pressed="false" aria-describedby="kanban-keys">
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></svg>
          </button>
          <p class="ap-kanban__what">Design review</p>
          <span class="ap-kanban__tag" data-tone="accent">Design</span>
          <span class="ap-kanban__due">Due 8 Oct</span>
          <button type="button" class="ap-kanban__move" id="kanban-move-review" aria-label="Move Design review" aria-haspopup="menu" aria-expanded="false" aria-controls="kanban-menu">
            Move
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m6 9 6 6 6-6"/></svg>
          </button>
        </li>
        <li class="ap-kanban__card" data-ap-task="notes">
          <button type="button" class="ap-kanban__grip" aria-label="Pick up Write release notes" aria-pressed="false" aria-describedby="kanban-keys">
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></svg>
          </button>
          <p class="ap-kanban__what">Write release notes</p>
          <span class="ap-kanban__tag" data-tone="info">Writing</span>
          <span class="ap-kanban__due">Due 10 Oct</span>
          <button type="button" class="ap-kanban__move" id="kanban-move-notes" aria-label="Move Write release notes" aria-haspopup="menu" aria-expanded="false" aria-controls="kanban-menu">
            Move
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m6 9 6 6 6-6"/></svg>
          </button>
        </li>
      </ul>
      <p class="ap-kanban__blank" data-ap-blank hidden>No cards here yet.</p>
    </div>
    <div class="ap-kanban__col" data-ap-col="done">
      <div class="ap-kanban__head">
        <h4 class="ap-kanban__name" id="kanban-done">Done</h4>
        <span class="ap-kanban__tally" aria-hidden="true" data-ap-tally>2</span>
      </div>
      <ul class="ap-kanban__cards" aria-labelledby="kanban-done" data-ap-cards>
        <li class="ap-kanban__card" data-ap-task="errors">
          <button type="button" class="ap-kanban__grip" aria-label="Pick up Set up error tracking" aria-pressed="false" aria-describedby="kanban-keys">
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></svg>
          </button>
          <p class="ap-kanban__what">Set up error tracking</p>
          <span class="ap-kanban__tag" data-tone="warning">Engineering</span>
          <span class="ap-kanban__due">Done 2 Oct</span>
          <button type="button" class="ap-kanban__move" id="kanban-move-errors" aria-label="Move Set up error tracking" aria-haspopup="menu" aria-expanded="false" aria-controls="kanban-menu">
            Move
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m6 9 6 6 6-6"/></svg>
          </button>
        </li>
        <li class="ap-kanban__card" data-ap-task="dark">
          <button type="button" class="ap-kanban__grip" aria-label="Pick up Ship dark theme" aria-pressed="false" aria-describedby="kanban-keys">
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M9 6h.01M15 6h.01M9 12h.01M15 12h.01M9 18h.01M15 18h.01"/></svg>
          </button>
          <p class="ap-kanban__what">Ship dark theme</p>
          <span class="ap-kanban__tag" data-tone="accent">Design</span>
          <span class="ap-kanban__due">Done 5 Oct</span>
          <button type="button" class="ap-kanban__move" id="kanban-move-dark" aria-label="Move Ship dark theme" aria-haspopup="menu" aria-expanded="false" aria-controls="kanban-menu">
            Move
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m6 9 6 6 6-6"/></svg>
          </button>
        </li>
      </ul>
      <p class="ap-kanban__blank" data-ap-blank hidden>No cards here yet.</p>
    </div>
  </div>

  <div class="ap-kanban__menu" role="menu" id="kanban-menu" aria-labelledby="kanban-move-hindi" hidden>
    <div role="group" aria-labelledby="kanban-menu-cap">
      <span class="ap-kanban__menu-cap" id="kanban-menu-cap" aria-hidden="true">Move to column</span>
      <button type="button" class="ap-kanban__item" role="menuitemradio" aria-checked="false" tabindex="-1" data-ap-to="todo"><svg class="ap-kanban__check" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m5 12 5 5L20 7"/></svg>To do</button>
      <button type="button" class="ap-kanban__item" role="menuitemradio" aria-checked="false" tabindex="-1" data-ap-to="doing"><svg class="ap-kanban__check" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m5 12 5 5L20 7"/></svg>In progress</button>
      <button type="button" class="ap-kanban__item" role="menuitemradio" aria-checked="false" tabindex="-1" data-ap-to="done"><svg class="ap-kanban__check" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m5 12 5 5L20 7"/></svg>Done</button>
    </div>
    <div class="ap-kanban__sep" role="separator"></div>
    <button type="button" class="ap-kanban__item" role="menuitem" tabindex="-1" data-ap-shift="-1"><svg class="ap-kanban__arrow" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12 19V5M6 11l6-6 6 6"/></svg>Move up</button>
    <button type="button" class="ap-kanban__item" role="menuitem" tabindex="-1" data-ap-shift="1"><svg class="ap-kanban__arrow" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12 5v14M6 13l6 6 6-6"/></svg>Move down</button>
  </div>

  <p class="ap-kanban__sr" aria-live="polite" data-ap-live></p>
  <span class="ap-kanban__sr" data-ap-msg="lift" hidden>Picked up {card}. {column}, position {pos} of {total}.</span>
  <span class="ap-kanban__sr" data-ap-msg="move" hidden>{card}. {column}, position {pos} of {total}.</span>
  <span class="ap-kanban__sr" data-ap-msg="drop" hidden>Dropped {card}. {column}, position {pos} of {total}.</span>
  <span class="ap-kanban__sr" data-ap-msg="cancel" hidden>Cancelled. {card} is back in {column}, position {pos} of {total}.</span>
  <span class="ap-kanban__sr" data-ap-msg="moved" hidden>Moved {card} to {column}, position {pos} of {total}.</span>
</div>

डब्ल्यूसीएजी 2.2

यह किन मानदंडों को पूरा करता है

वे सफलता मानदंड जिनका यह पैटर्न ध्यान रखता है, और कैसे।

  • 1.3.1 जानकारी और संबंध स्तर A

    हर कॉलम अपने हेडिंग से नामित एक सूची है, इसलिए स्क्रीन रीडर बताते हैं कि उसमें कितने कार्ड हैं, और कार्ड हिलने पर गिनती बदल जाती है।

  • 2.1.1 कीबोर्ड स्तर A

    माउस से खींचकर जो कुछ होता है, वह सब कीबोर्ड से, हैंडल या ले जाएँ मेन्यू से किया जा सकता है।

  • 2.4.3 फ़ोकस क्रम स्तर A

    फ़ोकस कार्ड के साथ उसके हैंडल या ले जाएँ बटन पर जाता है, इसलिए वह पुराने कॉलम में कभी पीछे नहीं छूटता।

  • 2.4.7 फ़ोकस दिखाई देना स्तर AA

    हैंडल, ले जाएँ बटन और मेन्यू आइटम दो पिक्सेल की रिंग दिखाते हैं, और उठाए गए कार्ड को एक किनारा और उठी हुई छाया भी मिलती है।

  • 2.5.7 ड्रैगिंग मूवमेंट स्तर AA

    ले जाएँ मेन्यू किसी भी कार्ड को किसी भी कॉलम में, या ऊपर-नीचे, एक-एक क्लिक या टैप से ले जाता है, इसलिए खींचना कभी ज़रूरी नहीं।

  • 4.1.2 नाम, भूमिका, मान स्तर A

    हैंडल एक टॉगल बटन है जो कार्ड पकड़े रहने तक दबा रहता है, और मेन्यू के कॉलम रेडियो आइटम हैं जिनमें मौजूदा कॉलम चुना हुआ है।

  • 4.1.3 स्टेटस मैसेज स्तर AA

    उठाना, ले जाना, रखना और रद्द करना एक विनम्र लाइव रीजन में कार्ड, कॉलम और स्थान के साथ बताया जाता है।

उपयोग

इसे कब इस्तेमाल करें

इसे अपनाएँ

  • ऐसा काम जो चरणों से गुज़रता है, जैसे काम, भर्ती के चरण या सपोर्ट टिकट।
  • किसी छोटी टीम का साझा दृश्य जहाँ पूरा प्रवाह एक नज़र में देखना मायने रखता है।

कुछ और इस्तेमाल करें

  • एक ही सूची का क्रम बदलना: ऊपर और नीचे वाले एक्शन वाली सॉर्ट होने योग्य सूची ज़्यादा सरल है।
  • सैकड़ों आइटम: लोगों को स्टेटस कॉलम और फ़िल्टर वाली तालिका दें।
  • एक ही कदम में बदलने वाला स्टेटस: हर आइटम पर एक सेलेक्ट बोर्ड से तेज़ है।

आम विफलताएँ

आमतौर पर यह कहाँ गलत होता है

  • सिर्फ़ खींचना और छोड़ना

    कीबोर्ड, स्विच, वॉइस कंट्रोल या कंपकंपी वाली एक उँगली इस्तेमाल करने वाले लोग खींच नहीं सकते। हर कार्ड पर एक ले जाएँ मेन्यू है जो एक-एक क्लिक से चलता है, और एक हैंडल जो कीबोर्ड से चलता है।

  • चुपचाप बदलाव

    बिना कुछ कहे कॉलम बदलने वाला कार्ड स्क्रीन रीडर उपयोगकर्ताओं को अंदाज़ा लगाने पर छोड़ देता है कि वह कहाँ गया। हर कदम कार्ड, कॉलम और स्थान बताता है।

  • पीछे छूटा फ़ोकस

    फ़ोकस वाले एलिमेंट का डीओएम नोड हिलाने से फ़ोकस पेज के ऊपर गिर सकता है। हर बदलाव के बाद फ़ोकस कार्ड के हैंडल या ले जाएँ बटन पर वापस रखा जाता है।

  • चल रहे खिंचाव को पलटने का कोई तरीका नहीं

    उठाए जाने के बाद कार्ड का वापस जा पाना ज़रूरी है। Escape उसे वहीं लौटा देता है जहाँ से वह शुरू हुआ था, कीबोर्ड के लिए भी और माउस से खींचने के लिए भी।

  • अपनी गिनती छिपाने वाले कॉलम

    बैज में बनी संख्या सहायक तकनीक के लिए अदृश्य होती है। हर कॉलम एक सूची है, इसलिए उसका आकार बताया जाता है, और बैज साथ-साथ बदलता रहता है।

  • बहुत छोटे खींचने वाले हैंडल

    कुछ पिक्सेल चौड़े हैंडल पर निशाना लगाना मुश्किल है। यहाँ हैंडल 32 पिक्सेल का वर्ग है, माउस पूरा कार्ड पकड़ सकता है, और ले जाएँ बटन पूरे आकार का लक्ष्य है।

नोट्स

इसे बनाना

  • हैंडल उठाने और रखने के लिए ऐसे click इवेंट इस्तेमाल करता है जिनमें event.detail 0 होता है, जो Enter, Space और स्क्रीन रीडर से सक्रिय करने पर बनते हैं; माउस इसकी जगह खींचना इस्तेमाल करता है।
  • माउस कार्ड पर कहीं से भी खींच सकता है; टच और पेन सिर्फ़ हैंडल से खींचते हैं, इसलिए बोर्ड पर स्वाइप करने से पेज अब भी स्क्रॉल होता है।
  • घोषणाएँ मार्कअप में टेम्पलेट हैं, जिनमें कार्ड, कॉलम और स्थान भरे जाते हैं, ताकि अनुवाद शब्दों को अपने क्रम में रख सके।
  • एक ही ले जाएँ मेन्यू सभी कार्ड साझा करते हैं और वह उसी कार्ड में ले जाया जाता है जो उसे खोलता है, ताकि वह अपनी जगह पढ़ा जाए और मार्कअप छोटा रहे।
  • कार्ड 180 मिलीसेकंड में अपनी नई जगह पर सरकते हैं, और जब सिस्टम कम गति माँगे तो सीधे वहाँ पहुँच जाते हैं।

स्रोत: डब्ल्यूसीएजी 2.2: खींचने वाली गतिविधियों को समझना · WAI-एआरआईए ऑथरिंग प्रैक्टिसेज़: मेन्यू बटन

लाइट और डार्क थीम में, डेस्कटॉप और फ़ोन की चौड़ाई पर axe से और कीबोर्ड से जाँचा गया। अभी हर स्क्रीन रीडर और ब्राउज़र जोड़ी के साथ नहीं परखा गया। सुधार बताएँ