Metadata-Version: 2.4
Name: collective.anysurfer
Version: 2.0.0
Summary: Anysurfer (Belgian accessibility standard) support for Plone
Author-email: Plone Collective <collective@plone.org>
License-Expression: GPL-2.0-only
Project-URL: PyPI, https://pypi.org/project/collective.anysurfer
Project-URL: Source, https://github.com/collective/collective.anysurfer
Project-URL: Issues, https://github.com/collective/collective.anysurfer/issues
Project-URL: Changelog, https://github.com/collective/collective.anysurfer/blob/master/CHANGES.md
Keywords: Python,Plone,accessibility,Anysurfer
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Plone
Classifier: Framework :: Plone :: 6.1
Classifier: Framework :: Plone :: 6.2
Classifier: Framework :: Plone :: Addon
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.GPL
License-File: LICENSE.md
Requires-Dist: Products.CMFCore
Requires-Dist: Products.CMFPlone
Requires-Dist: Products.GenericSetup
Requires-Dist: Products.PortalTransforms
Requires-Dist: Zope
Requires-Dist: beautifulsoup4
Requires-Dist: collective.z3cform.datagridfield
Requires-Dist: lxml
Requires-Dist: plone.api
Requires-Dist: plone.app.layout
Requires-Dist: plone.app.registry
Requires-Dist: plone.app.textfield
Requires-Dist: plone.autoform
Requires-Dist: plone.base
Requires-Dist: plone.i18n
Requires-Dist: plone.memoize
Requires-Dist: plone.registry
Requires-Dist: plone.theme
Requires-Dist: plone.transformchain
Requires-Dist: z3c.jbot
Provides-Extra: test
Requires-Dist: plone.app.contenttypes; extra == "test"
Requires-Dist: plone.app.testing; extra == "test"
Requires-Dist: plone.testing; extra == "test"
Requires-Dist: zest.releaser[recommended]; extra == "test"
Requires-Dist: zestreleaser.towncrier; extra == "test"
Requires-Dist: zope.testrunner; extra == "test"
Dynamic: license-file

# collective.anysurfer

[![Tests](https://github.com/collective/collective.anysurfer/actions/workflows/test-matrix.yml/badge.svg)](https://github.com/collective/collective.anysurfer/actions/workflows/test-matrix.yml)
[![Meta](https://github.com/collective/collective.anysurfer/actions/workflows/meta.yml/badge.svg)](https://github.com/collective/collective.anysurfer/actions/workflows/meta.yml)

This package adds [Anysurfer](https://anysurfer.be/fr) support to Plone.
Anysurfer is a Belgian accessibility standard equivalent to WCAG 2.0 A.

This package is totally transparent for the user.
It fixes various accessibility issues in Plone, in standard features,
content types, body texts, forms, search results, ...

It also overrides Plone Accessibility info to allow its edition through
the Anysurfer control panel.


## Features

1. Adds missing page titles for views / skins / 404 error page
2. Add search results count in H1 and move H1 to the top
3. Add search results count in page title
4. Fixes News item image alt
5. Removes empty `<ul>` lists
6. Allows empty image alt
7. Fixes 'Required' labels html position
8. Replace Plone `replacetag="h2"` by real tag
9. Replace default Accessibility info with a multilingual editable text
10. Replace "nav" by "div" for breadcrumb


## Compatibility

Version 2.x supports Plone 6.1 on Python 3.10 to 3.13, and Plone 6.2 on Python
3.10 to 3.14.
For Plone 4.3 to 6.0, use collective.anysurfer 1.4.x.

The search page and breadcrumb overrides still use the Plone 5 markup.


## Translations

This product has been translated into

- English
- French
- Dutch (with missing translations)


## Installation

Add `collective.anysurfer` to the dependencies of your project
(`pyproject.toml`, or `requirements.txt` with the Plone constraints), install
it, restart Plone and activate the add-on in *Site Setup* > *Add-ons*. This
also installs collective.z3cform.datagridfield.

The accessibility text is edited in *Site Setup* > *Anysurfer*.


## Development

Requires [uv](https://docs.astral.sh/uv/). This installs Plone 6.2.3 in `.venv`
(use `PLONE_VERSION=6.1.6 make install` for another version) and the prek git
hook:

```shell
make install
make start          # Plone on http://localhost:8080 (admin / admin)
```

Create a Classic UI site from the browser, then activate collective.anysurfer.

### Tests

Tests run through tox, as the CI does:

```shell
make test                                   # Plone 6.2.3
uvx --with tox-uv tox -e py312-plone61      # one Plone / Python combination
make test-all                               # lint, every combination, dependencies
```

Without tox (the tests check French translations, so compile the `.mo` files):

```shell
zope_i18n_compile_mo_files=true .venv/bin/zope-testrunner --test-path=src -s collective.anysurfer
```

### Lint

```shell
make check          # format then lint (pyupgrade, isort, black, zpretty, flake8...)
```

### Translations

```shell
make i18n           # rebuild the collective.anysurfer catalog
```

`.editorconfig`, `.flake8`, `.gitignore`, `.pre-commit-config.yaml`, `tox.ini`,
`.github/` and the tool sections of `pyproject.toml` are generated by
[plone.meta](https://github.com/plone/meta): change `.meta.toml`, then run
`uvx --from plone.meta config-package --no-commit --branch current .`.


## Contribute

- Issue Tracker: https://github.com/collective/collective.anysurfer/issues
- Source Code: https://github.com/collective/collective.anysurfer


## License

The project is licensed under the GPLv2.

# Contributors

- Godefroid Chapelle, Original Author [BubbleNet]
- Laurent Lasudry [Affinitic]
- Valentin Piret [Affinitic]
- Sébastien Sirtoli [Affinitic]
- Christophe Boulanger [iMio]
- Benoît Suttor [iMio]

# Changelog

<!-- towncrier release notes start -->

## 2.0.0 (2026-11-18)


- Breaking: replace the `pkg_resources` namespace of `collective` with a
  PEP 420 native namespace. Support Plone 6.1 only on Python 3.10 to 3.13,
  and Plone 6.2 on Python 3.10 to 3.14. Use 1.4.x for Plone 4.3 to 6.0.
  [remdub]

- Drop the Python 2 and Plone 4 code: `HAS_PLONE_5` and `HAS_PLONE_6` (which
  called `plone.api` at import time), the Plone 4 language handling and
  `search.js`, and the overrides of templates that no longer exist
  (accessibility-info skin template, `plone.app.search`). Register
  `search.js` and the breadcrumb viewlet without `zcml:condition`.
  [remdub]

- Import `INonInstallable`, `IPloneSiteRoot` and `safe_text` from
  `plone.base` instead of the aliases Plone 6.2 deprecates. Port the tests to
  `unittest`, `plone.testing.zope` and `get_installer`: they could no longer
  run on Python 3.10+ (`unittest2`) nor on Plone 5.2+ (`portal_quickinstaller`).
  [remdub]

- Configure the package with plone.meta 2.12.0 (test matrix on Plone 6.2.3
  and 6.1), move its metadata to `pyproject.toml`, convert the documentation
  to Markdown and run the development environment on Plone 6.2.3 with uv
  instead of buildout. Drop Travis and the buildout configuration.
  [remdub]


## 1.4.7 (2022-10-18)

- Change permissions : By default, configlet should be accessible for Manager AND Site Administrator
  [boulch]


## 1.4.6 (2022-08-17)

- Fix import error for `ILanguageSchema` on Plone 5.2 / 6
  [laulaz]


## 1.4.5 (2022-01-19)

- Get rid of includeDependencies for Plone 6 compatibility
  [laulaz]

- Add `from_encoding` parameter to BeautifulSoup transformations to fix encoding.
  [boulch]

- Include CMFCore permissions to avoid potential ComponentLookupError
  [laulaz]


## 1.4.4 (2021-08-09)

- Add Plone 6 compatibility.
  [bsuttor]


## 1.4.3 (2021-07-31)

- Fix import from collective.z3cform.datagridfield
  [laulaz]

- Fix python3 compatibility : use html.escape instead of cgi.escape
  [boulch]


## 1.4.2 (2021-01-06)

- Breadcrumb is already in a "div" in Plone4, so, we override plone.app.layout.viewlets.path_bar.pt. only for Plone5.
  [boulch]


## 1.4.1 (2021-01-04)

- Override plone.app.layout.viewlets.path_bar.pt. Change `<nav>` to `<div>`
  [boulch]


## 1.4 (2020-11-18)

- Add Plone 5 (Python 3) compatibility
  [boulch, laulaz]

- Add uninstall profile
  [laulaz]


## 1.3.4 (2020-11-04)

- Content types images should be inside links in search results
  [laulaz]


## 1.3.3 (2020-06-17)

- Avoid displaying 'None' title for unknown browser views
  [laulaz]

- Avoid traversal error with unicode urls
  [laulaz]


## 1.3.2 (2020-06-15)

- Fix multilingual default text translations at install : #3
  [laulaz]


## 1.3.1 (2020-05-28)

- Fix upgrade steps (1.2 -> 1.3)
  [laulaz]


## 1.3 (2020-05-28)

- Override Accessibility info with a multilingual / editable / filled by default
  text. The text can be changed in a new Anysurfer control panel (upgrade step
  included)
  [boulch, laulaz]

- Fix 404 / EN pages title handling
  [laulaz]

- Update/fix buildout & tests
  [boulch, laulaz]

- Make titles calculation more robust in [uni/multi]lingual websites : #1
  [laulaz]


## 1.2.2 (2020-04-29)

- Fix view titles calculation in multilingual websites : #1
  [laulaz]

- Add missing plone.api dependency
  [laulaz]


## 1.2.1 (2019-11-20)

- Harmonization of '(Required)' syntax for fields
  [laulaz]


## 1.2 (2019-10-04)

- Add documentation, contributors, fix setup.py & use RST
  [laulaz]

- Handle more Anysurfer usecases : empty lists, bad alts, required labels, ...
  [laulaz]

- Move h1, add search results count in search page title & handle JS refresh
  [laulaz]

- Handle 404 page
  [vpiret]

- Migrate to plone 5
  [oxydedefer]

- Add missing translations for accessibility view title
  [laulaz]

- Add missing translations for contact-info view title
  [laulaz]


## 1.1 (2012-11-12)

- Nothing changed yet.


## 1.0 (2012-11-09)

- Package created using zopeskel
  []
