? ? Pending

User tests: Successful: Unsuccessful:

avatar twsvaishali
twsvaishali
5 Dec 2019
avatar joomla-cms-bot joomla-cms-bot - change - 5 Dec 2019
Category Layout Libraries
avatar twsvaishali twsvaishali - open - 5 Dec 2019
avatar twsvaishali twsvaishali - change - 5 Dec 2019
Status New Pending
avatar twsvaishali twsvaishali - change - 5 Dec 2019
The description was changed
avatar twsvaishali twsvaishali - edited - 5 Dec 2019
avatar twsvaishali twsvaishali - change - 5 Dec 2019
The description was changed
avatar twsvaishali twsvaishali - edited - 5 Dec 2019
avatar twsvaishali twsvaishali - change - 5 Dec 2019
Labels Added: ?
avatar alikon
alikon - comment - 5 Dec 2019

is this a work in progress ?
as example this one has not been added from #16141
https://github.com/joomla/joomla-cms/blob/4.0-dev/layouts/joomla/form/field/color/advanced.php

avatar Quy Quy - change - 5 Dec 2019
Title
Allow jForm to support data attribute
'Allow jForm to support data attribute
avatar Quy Quy - edited - 5 Dec 2019
avatar Quy Quy - change - 5 Dec 2019
Title
'Allow jForm to support data attribute
[4.0] Allow jForm to support data attribute
avatar Quy Quy - edited - 5 Dec 2019
avatar dgrammatiko
dgrammatiko - comment - 5 Dec 2019

@twsvaishali please extend this for aria-*

avatar twsvaishali
twsvaishali - comment - 6 Dec 2019

is this a work in progress ?
as example this one has not been added from #16141
https://github.com/joomla/joomla-cms/blob/4.0-dev/layouts/joomla/form/field/color/advanced.php

Have added remaining fields in latest commits. Please check.

avatar twsvaishali
twsvaishali - comment - 6 Dec 2019

@twsvaishali please extend this for aria-*

Can we start new PR for this?

avatar alikon
alikon - comment - 6 Dec 2019

Have added remaining fields in latest commits. Please check.

seems fine now thanks

yes maybe another PR for the aria-*

avatar dgrammatiko
dgrammatiko - comment - 6 Dec 2019

@alikon @twsvaishali for the aria-* all is needed is a var ariaAttributes
and adding

				// Check for aria attribute
 				if (strpos($name, "aria-") === 0 && array_key_exists($name, $this->ariaAttributes))
 				{
 					return $this->ariaAttributes[$name];
 				}

in the main class and some minor adjustments in the layouts. Of course it can be done in another PR to make things easier for testing. I just had to mention that, since a11y is always an afterthought...

avatar dgrammatiko
dgrammatiko - comment - 6 Dec 2019

@twsvaishali since you're redoing this maybe we could change the layouts logic to:

if (!empty($dataAttributes)) {
	// Data attributes - data-*
	$dataAttribute = '';

	foreach ($dataAttributes as $key => $attrValue)
	{
		$dataAttribute .= ' ' . $key . '="' . htmlspecialchars($attrValue, ENT_COMPAT, 'UTF-8') . '"';
	}
}

In essence the loop will execute only if there are any data-* attributes defined.
Micro optimisation? Maybe, maybe not, I haven't benchmarked the code but this seems reasonable...

avatar twsvaishali
twsvaishali - comment - 6 Dec 2019

@dgrammatiko Yes. Will start another PR for the aria-* once this is tested and merged. Also I am actually not sure if all fields will have area attribute.

avatar wilsonge wilsonge - change - 16 Feb 2020
Labels Added: ?
avatar wilsonge
wilsonge - comment - 16 Feb 2020

Rebased this. Anyone able to test this?

avatar wilsonge wilsonge - change - 24 Mar 2020
Labels Added: Conflicting Files
Removed: ?
avatar jwaisner jwaisner - change - 27 May 2020
Priority Medium Urgent
avatar richard67 richard67 - test_item - 27 May 2020 - Tested successfully
avatar richard67
richard67 - comment - 27 May 2020

I have tested this item successfully on d46baf1

Works so far.

Maybe some fields are missing because they did not exist (yet) when this PR was made.

It needs someone who checks for completeness and if necessary makes a new PR.

Same with the idea to do the same for "aria-" attributes, this should be done in another PR, too.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27212.

avatar Quy Quy - test_item - 27 May 2020 - Tested successfully
avatar Quy
Quy - comment - 27 May 2020

I have tested this item successfully on d46baf1


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27212.

avatar Quy Quy - change - 27 May 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 27 May 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27212.

avatar richard67
richard67 - comment - 28 May 2020

@wilsonge @Quy What about the following field layouts? They are not touched by this PR. Shall they be done, too?

  • checkboxes.php
  • color/slider.php
  • contenthistory.php
  • radio/buttons.php
  • radio/switcher.php
  • tag.php
avatar HLeithner HLeithner - close - 28 May 2020
avatar HLeithner HLeithner - merge - 28 May 2020
avatar HLeithner HLeithner - change - 28 May 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-05-28 18:42:03
Closed_By HLeithner
Labels Added: ?
Removed: Conflicting Files
avatar HLeithner
HLeithner - comment - 28 May 2020

Thanks all!

Add a Comment

Login with GitHub to post a comment