Skip to content

Conversation

@RabbiIslamRony
Copy link
Member

@RabbiIslamRony RabbiIslamRony commented Dec 28, 2025

…rovements

  • Add dynamic icon rendering based on selected file type (image, audio, video, document, all_types)
  • Replace static file size text with dynamic value from builder configuration
  • Wrap upload area with full-width label for better accessibility
  • Optimize file type groups lookup to avoid duplicate function calls
  • Improve screen reader support and keyboard navigation

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

Fixes the File Upload custom field to dynamically display icons and file size based on builder configuration, and improves accessibility by wrapping the upload area with a full-width label.

Changes

  • Dynamic Icon Display: File upload field now shows appropriate icons based on selected file type:

    • Image types → Image icon
    • Audio types → Audio file icon
    • Video types → Video file icon
    • Document types → Document icon
    • All types → File upload icon
    • Specific extensions are mapped to their respective group icons
  • Dynamic File Size: Replaces static "1600×1200 or larger" text with dynamic file size from builder configuration (e.g., "Maximum file size: 2mb")

  • Accessibility Improvements:

    • Wraps entire upload area with full-width label for better clickability
    • Improves screen reader support
    • Enhances keyboard navigation
    • Follows WCAG accessibility guidelines

Testing

  • Tested with different file types (image, audio, video, document, all_types)
  • Verified dynamic icon changes based on builder configuration
  • Confirmed file size text displays correctly from builder settings
  • Tested accessibility with screen reader
  • Verified keyboard navigation works properly

Files Changed

  • templates/listing-form/custom-fields/file.php

Related Issues

Fixes issue where File Upload field showed static icon and text regardless of builder configuration.

Live Video

https://www.loom.com/share/9288662717d7477cb7e811ffa3bc6b31

Any linked issues

Fixes #
#2443
https://taiga-sovware-u10698.vm.elestio.app/project/directorist/issue/2172

Checklist

…rovements

- Add dynamic icon rendering based on selected file type (image, audio, video, document, all_types)
- Replace static file size text with dynamic value from builder configuration
- Wrap upload area with full-width label for better accessibility
- Optimize file type groups lookup to avoid duplicate function calls
- Improve screen reader support and keyboard navigation
- Implement dynamic icon rendering for various file types in the upload area
- Update SCSS to improve layout and hover effects for file thumbnails
- Add accessibility features including pointer events adjustments and improved file name display
- Ensure consistent styling for file icons and names to enhance user experience
@RabbiIslamRony RabbiIslamRony self-assigned this Dec 29, 2025
@RabbiIslamRony RabbiIslamRony added this to the v8.5.8 milestone Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant