Content-type: Task

Bug:
Section titles in the "content" tab, are not required. You can save the message but you'll get an error message + the anchor tags linking to the sections have no title, and could be completely invisible depending on the theme.

Fix:
Make section titles required.

Added:
patch to make them required.

Comments

bskibinski created an issue. See original summary.

bskibinski’s picture

Issue summary: View changes
StatusFileSize
new646 bytes
askibinski’s picture

Status: Needs review » Needs work

Problem with this patch: there are 3 sections available but you are not required to use them all. However, with this patch you would always need to add three sections with a title.

askibinski’s picture

Title: Make section titles required » Fix notice when empty section title in task

Changed title, fix would be to prevent the notice in the first place.

askibinski’s picture

Status: Needs work » Needs review
StatusFileSize
new870 bytes

Patch attached.

tessa bakker’s picture

I fought that a required FC-item field can be required if the FC-field itself isn't required.

The problem is, that there are always 3 items printed, instead of 1 or something equal to the used items, with a maximum of 3.

Also with the patch #5, a list item won't be printed and this could be a usability/accessibility issue.

A validation on title is in my opinion the way to go, when the body of the FC-item isn't empty, the title is required.

Or.. there is only one FC-item with an 'Add more' button with a max of 3 and FC-item-title-field is required.

tessa bakker’s picture

Status: Needs review » Needs work
askibinski’s picture

@Tessa: the add more functionality with a max of 3 would be best, in that case the title could be required.
There is a RTBC patch for field_collections to allow for an add more button:
https://www.drupal.org/node/1788222

However, I'm not sure if this patch takes into account a maximum number of items set. Worth testing though!

bskibinski’s picture

The 'add more' doesn't solve the problem of the required title.
Even if there is just one title+body, and the title is required, then you have to fill it, even if you want to leave it empty. So you would always need the "body isset" check.

But on second thought i don't think making it required is the best solution. The customer wanted to make a very short task, and didn't need the extra title, it would just make it confusing to read, so just displaying the text without anchor/title is fine.

I think making it optional is best for now. I don't understand why this is an accessibility issue though?

tessa bakker’s picture

If the customer want to create a very short task, don't use a section.

A section is only needed for complex tasks where headings are needed.

Why titles need to be required is because if you have 2 or more sections, you can skip to section 2 or 3 with the small in-page menu very helpful on small screens like phones). Also this menu can be use to style the sections as tabs on wider screens.

askibinski’s picture

Status: Needs work » Reviewed & tested by the community

I've created a follow-up for these improvements: #2757727: Improve sections UX so the patch in #5 can be committed.

ralphvdhoudt’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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