Problem/Motivation

Currently the tab items contain the class horizontal-tab-button+i however it is not easy to retrieve the numeric key (i) of the currently selected tab. Therefor it is useful we we have an attribute for this - horizontal-tab-button="i".

Proposed resolution

Add the attribute horizontal-tab-button to each tab item.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#8 2848008-8.patch502 byteskfritsche
#7 2848008-7.patch497 bytesgraceman9
#2 2848008-2.patch499 byteshchonov
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hchonov created an issue. See original summary.

hchonov’s picture

FileSize
499 bytes
kay_v’s picture

Version: 8.x-1.x-dev » 8.x-3.x-dev

this patch applies cleanly and resolves the stated issue when applied to field_group-8.x-3.x-dev

I'm switching the issue version to the above since the current core version (Drupal 8.4) requires it per the module project page:

For Drupal 8.3 and higher, use the fieldgroup 8.3 branch. When you still use a drupal version lower then 8.3, use the fieldgroup 8.1 branch

kay_v’s picture

Status: Needs review » Needs work
kay_v’s picture

Status: Needs work » Needs review
geek-merlin’s picture

Status: Needs review » Needs work

This sounds useful. Please add a data- prefix to the attribute to get valid html.
https://stackoverflow.com/a/31810008/606859

graceman9’s picture

Status: Needs work » Needs review
FileSize
497 bytes

Does anyone still need this?

kfritsche’s picture

FileSize
502 bytes

We still use this, but with a slight different version.

We use "attr('data-horizontalTabButton', i)" instead of data, because this is also used in our testing (behat + browsertest) and jqueries data doesn't serialize this back as an attribute to the DOM.

nils.destoop’s picture

Status: Needs review » Fixed

Thx for the patch. I committed it to dev

Status: Fixed » Closed (fixed)

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