This module provides an alternative way to Drupal's default menu block that adds disclosure buttons for submenus.

These are buttons next to menu links that toggle open the respective submenu. This allows keyboard users to choose whether they want to navigate into a submenu instead of being forced to tab through every single link in a multi-level menu. These buttons come complete with ARIA labels to inform users what the buttons control and what their status is. The JavaScript functionality is optional and customizable per menu block.

This module is based on the Web Accessibility Initiative's Example Disclosure Navigation Menu.

Project link

https://www.drupal.org/project/disclosure_menu

Comments

jayhuskins created an issue. See original summary.

vishal.kadam’s picture

Thank you for applying! Reviewers will review the project files, describing what needs to be changed.

Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.

To reviewers: Please read How to review security advisory coverage applications, What to cover in an application review, and Drupal.org security advisory coverage application workflow.

While this application is open, only the user who opened the application can make commits to the project used for the application.

Reviewers only describe what needs to be changed; they don't provide patches to fix what reported in a review.

vishal.kadam’s picture

Remember to change the status to Needs review when the project is ready for review.

avpaderno’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Thank you for applying. The project does not have any 2.1.x branch. Which branch should be reviewed?

jayhuskins’s picture

Status: Postponed (maintainer needs more info) » Needs review

@apaderno I updated the default branch to 2.1.x which can be reviewed here:
https://git.drupalcode.org/project/disclosure_menu/-/tree/2.1.x

vishal.kadam’s picture

Status: Needs review » Needs work

FILE: src/Plugin/Block/DisclosureMenuBlock.php

  /**
   * Overrides \Drupal\block\BlockBase::defaultConfiguration().
   */
  public function defaultConfiguration() {
  /**
   * Overrides \Drupal\block\BlockBase::blockForm().
   */
  public function blockForm($form, FormStateInterface $form_state) {
  /**
   * Overrides \Drupal\block\BlockBase::blockSubmit().
   */
  public function blockSubmit($form, FormStateInterface $form_state) {
  /**
   * Implements \Drupal\block\BlockBase::build().
   */
  public function build() {

{@inheritdoc} is used if you are overriding or implementing a method from a base class or interface.

jayhuskins’s picture

Status: Needs work » Needs review
vishal.kadam’s picture

Rest looks fine to me.

Let’s wait for other reviewers to take a look and if everything goes fine, you will get the role.

vinaymahale’s picture

Issue summary: View changes
avpaderno’s picture

vinaymahale’s picture

Priority: Normal » Major
vinaymahale’s picture

Priority: Major » Normal
Status: Needs review » Reviewed & tested by the community

No issues found
Changing status to RTBC!

avpaderno’s picture

    $form['disclosure_js']['include_default_js'] = [
      '#type' => 'radios',
      '#title' => $this->t('Include default Javascript'),
      '#description' => $this->t(
        'This will set disclosure buttons to toggle open submenus.'
      ),
      '#default_value' => $this->configuration['include_default_js'],
      '#options' => [
        1 => 'Yes',
        0 => 'No',
      ],
    ];

Option strings must be translated strings, similarly to what done with the other form fields, like the following one.

    $form['menu_disclosure']['menu_disclosure'] = [
      '#title' => $this->t('Add an additional disclosure button to toggle the entire menu?'),
      '#type' => 'radios',
      '#options' => [
        0 => $this->t('No'),
        1 => $this->t('Yes'),
      ],
      '#default_value' => $this->configuration['menu_disclosure'],
    ];
avpaderno’s picture

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the Slack #contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the reviewers.

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Reviewed & tested by the community » Fixed
jayhuskins’s picture

Thank you all so much!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.