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

तुलना टेबल

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

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

लाइव डेमो

आज़माएँ

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

प्लान की तुलना करें

कीमतें प्रति माह हैं, बिल सालाना बनता है, और इनमें GST शामिल है।

सभी 12 फ़ीचर दिख रहे हैं

स्टार्टर, प्रो और टीम प्लान, एक-एक फ़ीचर करके
फ़ीचर स्टार्टर ₹0 प्रति माह प्रो अनुशंसित ₹499 प्रति माह टीम ₹1,499 प्रति माह
प्रोजेक्ट और फ़ाइलें
प्रोजेक्ट 3 तक असीमित असीमित
स्टोरेज 2 GB 100 GB 1 TB
वर्ज़न इतिहास 7 दिन 1 वर्ष हमेशा
पीडीएफ में एक्सपोर्ट शामिल शामिल शामिल
मिलकर काम
सदस्य सिर्फ़ आप 5 तक असीमित
टिप्पणियाँ और मेंशन शामिल शामिल शामिल
मेहमान पहुँच शामिल नहीं शामिल शामिल
साझा टेम्पलेट शामिल नहीं शामिल नहीं शामिल
सुरक्षा और सहायता
दो-चरण साइन-इन शामिल शामिल शामिल
सिंगल साइन-ऑन शामिल नहीं शामिल नहीं शामिल
ऑडिट लॉग शामिल नहीं 30 दिन 1 वर्ष
सहायता सहायता केंद्र ईमेल प्राथमिकता, 4 घंटे में जवाब
कभी भी रद्द करें।

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

कीबोर्ड

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

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

कुंजीयह क्या करती है
Tabस्विच पर ले जाता है, फिर टेबल के स्क्रॉल हिस्से पर, फिर हर चुनें बटन पर।
Spaceस्विच पर, वे फ़ीचर छिपाता है जो हर प्लान में एक जैसे हैं, या सबको फिर से दिखाता है।
Arrow DownयाArrow UpयाArrow RightयाArrow Leftस्क्रॉल हिस्से में, टेबल को स्क्रॉल करता है; प्लान के नाम ऊपर और फ़ीचर के नाम बाईं ओर टिके रहते हैं।
EnterयाSpaceकिसी चुनें बटन पर, वह प्लान चुनता है और टेबल के नीचे उसकी पुष्टि करता है।

स्क्रीन रीडर

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

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

कबअपेक्षित घोषणा
फ़ोकस स्विच पर पहुँचता हैसिर्फ़ अंतर दिखाएँ, स्विच, बंद
Space उसे चालू करता है12 में से 9 फ़ीचर दिख रहे हैं: सिर्फ़ अंतर
टेबल नेविगेशन सदस्य वाली पंक्ति में दाईं ओर बढ़ता हैप्रो, अनुशंसित, ₹499 प्रति माह, 5 तक
वह मेहमान पहुँच वाली पंक्ति के एक क्रॉस पर पहुँचता हैस्टार्टर, ₹0 प्रति माह, शामिल नहीं
फ़ोकस बीच वाले बटन पर पहुँचता हैप्रो चुनें, बटन, ₹499 प्रति माह
बटन दबाया जाता हैआपने प्रो चुना। आगे: भुगतान का विवरण।

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

कोड

कोड कॉपी करें

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

मार्कअप

<div class="ap-comparison-table" data-ap-comparison-table>
  <div class="ap-comparison-table__top">
    <div class="ap-comparison-table__intro">
      <h3 class="ap-comparison-table__name" id="comparison-table-name">Compare plans</h3>
      <p class="ap-comparison-table__sub">Prices are per month, billed yearly, and include GST.</p>
    </div>
    <div class="ap-comparison-table__filter">
      <label class="ap-comparison-table__switch">
        <input class="ap-comparison-table__input" type="checkbox" role="switch" data-ap-differences />
        <span class="ap-comparison-table__track" aria-hidden="true"><span class="ap-comparison-table__thumb"></span></span>
        <span class="ap-comparison-table__switch-text">Show only differences</span>
      </label>
      <p class="ap-comparison-table__count" role="status" data-ap-features-shown>All 12 features shown</p>
    </div>
  </div>

  <div class="ap-comparison-table__scroll" role="region" aria-labelledby="comparison-table-name" tabindex="0">
    <table class="ap-comparison-table__table">
      <caption class="ap-comparison-table__vh">Starter, Pro and Team plans, feature by feature</caption>
      <thead>
        <tr>
          <th scope="col" class="ap-comparison-table__corner">Feature</th>
          <th scope="col" class="ap-comparison-table__plan">
            <span class="ap-comparison-table__plan-name">Starter</span>
            <span class="ap-comparison-table__price" id="comparison-table-starter-price"><strong>₹0</strong> per month</span>
          </th>
          <th scope="col" class="ap-comparison-table__plan ap-comparison-table__plan--pick">
            <span class="ap-comparison-table__plan-name">Pro</span>
            <span class="ap-comparison-table__tag">Recommended</span>
            <span class="ap-comparison-table__price" id="comparison-table-pro-price"><strong>₹499</strong> per month</span>
          </th>
          <th scope="col" class="ap-comparison-table__plan">
            <span class="ap-comparison-table__plan-name">Team</span>
            <span class="ap-comparison-table__price" id="comparison-table-team-price"><strong>₹1,499</strong> per month</span>
          </th>
        </tr>
      </thead>
      <tbody>
        <tr class="ap-comparison-table__group">
          <th scope="rowgroup" colspan="4"><span>Projects and files</span></th>
        </tr>
        <tr>
          <th scope="row">Projects</th>
          <td><span class="ap-comparison-table__value">Up to 3</span></td>
          <td><span class="ap-comparison-table__value">Unlimited</span></td>
          <td><span class="ap-comparison-table__value">Unlimited</span></td>
        </tr>
        <tr>
          <th scope="row">Storage</th>
          <td><span class="ap-comparison-table__value">2 GB</span></td>
          <td><span class="ap-comparison-table__value">100 GB</span></td>
          <td><span class="ap-comparison-table__value">1 TB</span></td>
        </tr>
        <tr>
          <th scope="row">Version history</th>
          <td><span class="ap-comparison-table__value">7 days</span></td>
          <td><span class="ap-comparison-table__value">1 year</span></td>
          <td><span class="ap-comparison-table__value">Forever</span></td>
        </tr>
        <tr>
          <th scope="row">Export to PDF</th>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
        </tr>
      </tbody>
      <tbody>
        <tr class="ap-comparison-table__group">
          <th scope="rowgroup" colspan="4"><span>Collaboration</span></th>
        </tr>
        <tr>
          <th scope="row">Members</th>
          <td><span class="ap-comparison-table__value">Just you</span></td>
          <td><span class="ap-comparison-table__value">Up to 5</span></td>
          <td><span class="ap-comparison-table__value">Unlimited</span></td>
        </tr>
        <tr>
          <th scope="row">Comments and mentions</th>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
        </tr>
        <tr>
          <th scope="row">Guest access</th>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--no" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m7.5 7.5 9 9M16.5 7.5l-9 9"/></svg><span class="ap-comparison-table__vh">Not included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
        </tr>
        <tr>
          <th scope="row">Shared templates</th>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--no" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m7.5 7.5 9 9M16.5 7.5l-9 9"/></svg><span class="ap-comparison-table__vh">Not included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--no" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m7.5 7.5 9 9M16.5 7.5l-9 9"/></svg><span class="ap-comparison-table__vh">Not included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
        </tr>
      </tbody>
      <tbody>
        <tr class="ap-comparison-table__group">
          <th scope="rowgroup" colspan="4"><span>Security and support</span></th>
        </tr>
        <tr>
          <th scope="row">Two-step sign-in</th>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
        </tr>
        <tr>
          <th scope="row">Single sign-on</th>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--no" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m7.5 7.5 9 9M16.5 7.5l-9 9"/></svg><span class="ap-comparison-table__vh">Not included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--no" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m7.5 7.5 9 9M16.5 7.5l-9 9"/></svg><span class="ap-comparison-table__vh">Not included</span></td>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--yes" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="9"/><path d="m8 12.4 2.7 2.7L16.2 9.6"/></svg><span class="ap-comparison-table__vh">Included</span></td>
        </tr>
        <tr>
          <th scope="row">Audit log</th>
          <td><svg class="ap-comparison-table__mark ap-comparison-table__mark--no" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="m7.5 7.5 9 9M16.5 7.5l-9 9"/></svg><span class="ap-comparison-table__vh">Not included</span></td>
          <td><span class="ap-comparison-table__value">30 days</span></td>
          <td><span class="ap-comparison-table__value">1 year</span></td>
        </tr>
        <tr>
          <th scope="row">Support</th>
          <td><span class="ap-comparison-table__value">Help center</span></td>
          <td><span class="ap-comparison-table__value">Email</span></td>
          <td><span class="ap-comparison-table__value">Priority, 4-hour reply</span></td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td class="ap-comparison-table__note">Cancel any time.</td>
          <td><button type="button" class="ap-btn ap-comparison-table__choose" aria-describedby="comparison-table-starter-price" data-ap-plan="Starter">Choose Starter</button></td>
          <td><button type="button" class="ap-btn ap-btn--primary ap-comparison-table__choose" aria-describedby="comparison-table-pro-price" data-ap-plan="Pro">Choose Pro</button></td>
          <td><button type="button" class="ap-btn ap-comparison-table__choose" aria-describedby="comparison-table-team-price" data-ap-plan="Team">Choose Team</button></td>
        </tr>
      </tfoot>
    </table>
  </div>

  <p class="ap-comparison-table__chosen" role="status" data-ap-chosen></p>
</div>

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

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

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

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

    प्लान th scope=col हैं, फ़ीचर th scope=row, और हर समूह का लेबल चारों कॉलम में फैला th scope=rowgroup है, इसलिए हर सेल के साथ एक प्लान और एक फ़ीचर जुड़ा रहता है।

  • 1.4.1 रंग का उपयोग स्तर A

    शामिल और शामिल नहीं, एक टिक और एक क्रॉस हैं, दो अलग आकार, और हर एक के साथ एक शब्द; अनुशंसित एक शब्द है, सिर्फ़ रंगा हुआ कॉलम नहीं।

  • 1.4.10 रीफ़्लो स्तर AA

    कम चौड़ाई पर टेबल अपने ही रीजन के अंदर स्क्रॉल होती है, जिसकी रीफ़्लो डेटा टेबल के लिए छूट देता है, जबकि उसके आसपास की हेडिंग, स्विच और बटन रीफ़्लो होते हैं।

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

    स्क्रॉल हिस्से पर फ़ोकस आ सकता है, इसलिए ऐरो की माउस या ट्रैकपैड के बिना टेबल को स्क्रॉल करती हैं।

  • 2.4.6 हेडिंग और लेबल स्तर AA

    हर बटन अपने प्लान का नाम लेता है, तीसरा चुनें नहीं बल्कि प्रो चुनें, और कीमत उसके विवरण के रूप में साथ रहती है।

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

    फ़िल्टर role=switch वाला एक चेकबॉक्स है, इसलिए वह चालू या बंद स्विच के रूप में बोला जाता है।

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

    फ़िल्टर करने के बाद बचे फ़ीचर की संख्या एक स्टेटस मैसेज है, जो फ़ोकस हिलाए बिना बोला जाता है।

उपयोग

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

इसे अपनाएँ

  • लोगों को कुछ प्लान या प्रोडक्ट में से एक चुनने में मदद करना, उन्हीं फ़ीचर के आधार पर, आमने-सामने।
  • स्पेसिफ़िकेशन शीट, जहाँ हर कॉलम एक विकल्प है और हर पंक्ति एक गुण।

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

  • चार या पाँच से ज़्यादा विकल्प: लोगों को पहले वे चुनने दें जिनकी तुलना करनी है।
  • एक ही प्रोडक्ट का विवरण: एक कॉलम वाली टेबल से विवरण सूची बेहतर पढ़ी जाती है।
  • ऐसी कीमतें जिनमें समझाने लायक एक ही प्लान हो: सादी सूचियों वाले कार्ड पढ़ने में आसान हैं।

आम विफलताएँ

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

  • टिक जो कुछ नहीं कहते

    सिर्फ़ आइकन वाला टिक या तो बिल्कुल नहीं पढ़ा जाता, या "इमेज" पढ़ा जाता है। यहाँ हर टिक और क्रॉस में छिपा हुआ शामिल या शामिल नहीं है।

  • div की पंक्ति में प्लान के नाम

    th scope=col के बिना सेल का कोई हेडर नहीं होता, इसलिए स्क्रीन रीडर बिना किसी प्लान के "शामिल" कहता है। असली हेडर हर सेल के लिए प्लान का नाम बताते हैं।

  • समूह के लेबल साधारण सेल के रूप में

    td में रखा सेक्शन का नाम फ़ीचर कॉलम के डेटा की तरह पढ़ा जाता है। पंक्ति में फैला th scope=rowgroup उसे अपने नीचे की पंक्तियों का हेडर बना देता है।

  • प्लान चुनें नाम के तीन बटन

    बटनों की सूची में खींचे जाने पर तीन एक जैसे नामों में फ़र्क़ नहीं किया जा सकता। स्टार्टर चुनें, प्रो चुनें और टीम चुनें में किया जा सकता है।

  • अनुशंसित सिर्फ़ रंगत से दिखाया गया

    रंगा हुआ कॉलम उन लोगों को कुछ नहीं बताता जो वह रंगत नहीं देख पाते, न ही स्क्रीन रीडर को। अनुशंसित शब्द प्लान के हेडर में है।

  • चुपचाप फ़िल्टर करना

    बिना किसी संदेश के ग़ायब होती पंक्तियाँ स्क्रीन रीडर उपयोगकर्ताओं को इस उलझन में छोड़ देती हैं कि कुछ हुआ भी या नहीं। यहाँ बचे फ़ीचर की गिनती बोली जाती है।

नोट्स

इसे बनाना

  • फ़िल्टर हुई पंक्तियों को hidden एट्रिब्यूट से छिपाएँ, ताकि स्क्रीन रीडर जो पंक्ति-गिनती बताए वह सही हो। opacity से अदृश्य की गई पंक्ति फिर भी पढ़ी जाती है।
  • टेबल तय ऊँचाई वाले रीजन के अंदर स्क्रॉल होती है ताकि प्लान के नाम टिके रह सकें। अगर आपकी टेबल कभी बगल की ओर स्क्रॉल नहीं होती, तो रीजन हटा दें और हेडर को पेज पर ही, अपनी साइट के हेडर के नीचे, टिकने दें।
  • चिपके रहने वाले सेल को अपारदर्शी बैकग्राउंड और border-collapse: separate चाहिए; collapsed बॉर्डर के साथ कुछ ब्राउज़र बॉर्डर को चिपके सेल से अलग होकर स्क्रॉल हो जाने देते हैं।
  • सीमाओं को दिखने वाले टेक्स्ट के रूप में रखें (5 तक, 100 GB): टिक ठीक वही हिस्सा छिपा देगा जिसकी लोग तुलना कर रहे हैं।
  • हर बटन पर aria-describedby उसके नाम के बाद कीमत जोड़ता है, इसलिए वह बटन के टेक्स्ट में दोहराए बिना सुनाई देती है।

स्रोत: W3C WAI टेबल ट्यूटोरियल: अनियमित हेडर वाली टेबल · एचटीएमएल: th एलिमेंट और उसका scope एट्रिब्यूट

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