Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aria/data attributes #27

Closed
WinterSilence opened this issue Dec 19, 2021 · 2 comments
Closed

Aria/data attributes #27

WinterSilence opened this issue Dec 19, 2021 · 2 comments

Comments

@WinterSilence
Copy link
Contributor

What steps will reproduce the problem?

Yii2 and this package support short syntax for data/aria attributes ('data' => ['suffix' => '...', 'suffix2' => '...']), but don't have methods to merge attributes using long syntax (['data-suffix' => '...']) with short syntax (['data' => ['suffix' => '...']]). This package uses both syntaxes, which only increases the chance of making error.

Two lines from single method:

'data' => ['bs-dismiss' => 'modal'],

if (!isset($this->toggleButton['data-bs-target']) && !isset($this->toggleButton['href'])) {

Fix

I see two solutions:

  1. add method to merge attributes
  2. select one syntax and replace another

Additional info

Q A
Yii vesion 2.0.*
PHP version any
Operating system any
@simialbi
Copy link
Collaborator

@bizley, @samdark may be a task for yii2 repository?

@WinterSilence
Copy link
Contributor Author

@simialbi already - yiisoft/yii2#19100 , but need fix attributes in this package too. Replace long syntax (['data-suffix' => '...']) to short syntax (['data' => ['suffix' => '...']]).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants