-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Adding missing rel attributes to URL menu item types #39275
Conversation
In terms of maintenance and usability in other extensions, wouldn't it be better to introduce a new form field in Joomla? RelAttributesField.php or something? |
And do what with the input/data/current field? Wouldn't that be a bigger b/c break? |
Not against it, just seeking to understand. :) |
Also can we keep the discussion about multiple rel attributes to the other PR? This one just adds the missing options without changing the field at all |
Roland @roland-d do you want to move this one to 4.3? |
@obuisard This is fine for 4.2 just needs some tests. |
I have tested this item ✅ successfully on 17dc81c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39275. |
1 similar comment
I have tested this item ✅ successfully on 17dc81c This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39275. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39275. |
Thank you! Nice to see that the options are matching the specifications now. |
Splitting this out from my other PR #39269 so that these don't get grouped with possibly breaking changes.
Summary of Changes
The URL menu item type has a field called "Link Rel Attribute".
MDN has a list of valid link types. Google also has some search-engine specific ones.
I compared these with the available options in the menu item and added missing values.
For front end links:
me
external
For back end links:
me
external
noopener
sponsored
ugc
While I don't expect back end menu items to be available for indexing, there might be cases where this happens intentionally (a public menu available in the admin login screen?) so it doesn't hurt to include those values as options in the admin menu item as well.
Testing Instructions
Create a new menu item type of "URL".
Go to the "Link Type" tab.
Open the "link rel attribute" dropdown.
Actual result BEFORE applying this Pull Request
Missing options.
Expected result AFTER applying this Pull Request
Options available!
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Yes, documentation is needed because this field is missing altogether from the docs. However, after over an hour fighting with the docs site to register an account and figure out the syntax, and filling out arcane captchas, my suggested edit was blocked as spam. I will not spend more time on this because I am frustrated. If anyone else wants to try, here is what I tried to add on this page before the 'common options' heading: