Skip to content
Snippets Groups Projects
Verified Commit bd81352e authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3432632 by simohell, smustgrave, kostyashupenko, andypost: Collapsed...

Issue #3432632 by simohell, smustgrave, kostyashupenko, andypost: Collapsed nav-tabs status not exposed to screen reader
parent 3a54db4a
No related branches found
No related tags found
28 merge requests!12227Issue #3181946 by jonmcl, mglaman,!11131[10.4.x-only-DO-NOT-MERGE]: Issue ##2842525 Ajax attached to Views exposed filter form does not trigger callbacks,!9470[10.3.x-only-DO-NOT-MERGE]: #3331771 Fix file_get_contents(): Passing null to parameter,!8540Issue #3457061: Bootstrap Modal dialog Not closing after 10.3.0 Update,!8528Issue #3456871 by Tim Bozeman: Support NULL services,!8373Issue #3427374 by danflanagan8, Vighneshh: taxonomy_tid ViewsArgumentDefault...,!5423Draft: Resolve #3329907 "Test2",!3878Removed unused condition head title for views,!3818Issue #2140179: $entity->original gets stale between updates,!3742Issue #3328429: Create item list field formatter for displaying ordered and unordered lists,!3731Claro: role=button on status report items,!3651Issue #3347736: Create new SDC component for Olivero (header-search),!3531Issue #3336994: StringFormatter always displays links to entity even if the user in context does not have access,!3478Issue #3337882: Deleted menus are not removed from content type config,!3355Issue #3209129: Scrolling problems when adding a block via layout builder,!3154Fixes #2987987 - CSRF token validation broken on routes with optional parameters.,!3133core/modules/system/css/components/hidden.module.css,!2964Issue #2865710 : Dependencies from only one instance of a widget are used in display modes,!2812Issue #3312049: [Followup] Fix Drupal.Commenting.FunctionComment.MissingReturnType returns for NULL,!2378Issue #2875033: Optimize joins and table selection in SQL entity query implementation,!2062Issue #3246454: Add weekly granularity to views date sort,!1105Issue #3025039: New non translatable field on translatable content throws error,!1073issue #3191727: Focus states on mobile second level navigation items fixed,!10223132456: Fix issue where views instances are emptied before an ajax request is complete,!877Issue #2708101: Default value for link text is not saved,!579Issue #2230909: Simple decimals fail to pass validation,!560Move callback classRemove outside of the loop,!555Issue #3202493
Pipeline #162962 passed
Pipeline: drupal

#162963

    // This test is a duplicate of oliveroPrimaryTabsTest.js tagged for claro
    const primaryTabsWrapper = '[data-drupal-nav-tabs]';
    const activeTab = '.tabs__tab.is-active';
    const inactiveTab = '.tabs__tab:not(.is-active)';
    const mobileToggle = `${activeTab} .tabs__trigger`;
    module.exports = {
    '@tags': ['core', 'claro'],
    before(browser) {
    browser
    .drupalInstall({
    setupFile:
    'core/tests/Drupal/TestSite/TestSiteClaroInstallTestScript.php',
    installProfile: 'minimal',
    })
    .drupalCreateUser({
    name: 'user',
    password: '123',
    permissions: ['administer nodes'],
    })
    .drupalLogin({ name: 'user', password: '123' });
    browser.setWindowSize(1600, 800);
    },
    after(browser) {
    browser.drupalUninstall();
    },
    'Verify desktop primary tab display': (browser) => {
    browser
    .drupalRelativeURL('/node/1')
    .waitForElementVisible(primaryTabsWrapper)
    .assert.visible(activeTab)
    .assert.visible(inactiveTab)
    .assert.not.visible(mobileToggle);
    },
    'Verify mobile tab display and click functionality': (browser) => {
    browser
    .setWindowSize(699, 800)
    .drupalRelativeURL('/node/1')
    .waitForElementVisible(primaryTabsWrapper)
    .assert.visible(activeTab)
    .assert.not.visible(inactiveTab)
    .assert.visible(mobileToggle)
    .assert.attributeEquals(mobileToggle, 'aria-expanded', 'false')
    .click(mobileToggle)
    .waitForElementVisible(inactiveTab)
    .assert.attributeEquals(mobileToggle, 'aria-expanded', 'true')
    .click(mobileToggle)
    .waitForElementNotVisible(inactiveTab)
    .assert.attributeEquals(mobileToggle, 'aria-expanded', 'false');
    },
    };
    <?php
    declare(strict_types=1);
    namespace Drupal\TestSite;
    use Drupal\Core\Extension\ModuleInstallerInterface;
    use Drupal\Core\Extension\ThemeInstallerInterface;
    use Drupal\node\Entity\Node;
    use Drupal\comment\Entity\Comment;
    /**
    * Setup file used by TestSiteInstallTestScript.
    *
    * @see \Drupal\Tests\Scripts\TestSiteApplicationTest
    */
    class TestSiteClaroInstallTestScript implements TestSetupInterface {
    /**
    * {@inheritdoc}
    */
    public function setup() {
    // Install required module for the Olivero front page.
    $module_installer = \Drupal::service('module_installer');
    assert($module_installer instanceof ModuleInstallerInterface);
    $module_installer->install(['olivero_test']);
    // Install Claro instead of Olivero and set it as the default theme.
    $theme_installer = \Drupal::service('theme_installer');
    assert($theme_installer instanceof ThemeInstallerInterface);
    $theme_installer->install(['claro'], TRUE);
    $system_theme_config = \Drupal::configFactory()->getEditable('system.theme');
    $system_theme_config->set('default', 'claro')->save();
    // Create an article that will have no comments
    $article_no_comments = Node::create(['type' => 'article']);
    $article_no_comments->set('title', 'Article without comments');
    // Enable comments
    $article_no_comments->set('comment', 2);
    $article_no_comments->save();
    // Create an article that will have comments
    $article_with_comments = Node::create(['type' => 'article']);
    $article_with_comments->set('title', 'Article with comments');
    // Enable comments
    $article_with_comments->set('comment', 2);
    $article_with_comments->save();
    $values = [
    // These values are for the entity that you're creating the comment for, not the comment itself.
    'entity_type' => 'node',
    'entity_id' => 2,
    'field_name' => 'comment',
    'uid' => 1,
    // These values are for the comment itself.
    'comment_type' => 'comment',
    'subject' => 'A comment',
    'comment_body' => 'Body of comment',
    // Whether the comment is 'approved' or not.
    'status' => 1,
    ];
    // Create comment entities out of our field values
    $comment1 = Comment::create($values);
    $comment1->save();
    $comment2 = Comment::create($values);
    $comment2->save();
    }
    }
    ......@@ -13,6 +13,7 @@
    const openMenu = () => {
    $target.toggleClass('is-open');
    $target.find('button').attr('aria-expanded', $target.hasClass('is-open'));
    };
    const toggleOrder = (reset) => {
    ......@@ -54,9 +55,11 @@
    // the width of the parent container.
    const isHorizontal = $tab.attr('data-width') <= $tab.outerWidth();
    $tab.toggleClass('is-horizontal', isHorizontal);
    $tab.find('button').attr('aria-expanded', null);
    toggleOrder(isHorizontal);
    } else {
    toggleOrder(false);
    $tab.find('button').attr('aria-expanded', 'false');
    }
    };
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment